|
|
Hi everyone,
I want to build a website that using live stream broadcasting as E-Learning in which the teacher's webcam broadcasted to all students and students could asking the teacher and he/she answer student's questions
Eng.Ahmed Yehia
Software Developer
Shura Solutions
|
|
|
|
|
|
Thanks Sandeep, it's helpful
|
|
|
|
|
I m making an online examination page on this page i created a gridview with paging when i go on next page thn aftr selecting options of answer of any question i m going on to another page. but when i come back on this previous page i cant see the previously selected answers the gridview page is refreshed thn, Please help me in it.
<body>
<div id="timer" style="float:right;">
<label id="tim" style="font-size:15px;"></label>
</div>
<div>
</body>
<asp:ScriptManager ID="scrpt1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="updt" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="examgrid" runat="server" AllowPaging="true"
AutoGenerateColumns="false" onrowdatabound="examgrid_RowDataBound"
PageSize="2" onpageindexchanging="examgrid_PageIndexChanging"
PageIndex="10" Width="528px" EnableViewState="false"
onrowcommand="examgrid_RowCommand"
onpageindexchanged="examgrid_PageIndexChanged" onload="examgrid_Load">
<Columns>
<asp:TemplateField HeaderText="Question">
<ItemTemplate>
<asp:Label ID="ques" runat="server" Text='<%#Eval("Ques_Name") %>'></asp:Label>
<asp:HiddenField ID="Question_Id" runat="server" Value='<%#Eval("Ques_Id") %>' /><br /><br />
<asp:RadioButton ID="opt1" runat="server" GroupName="Radio" Text='<%#Eval("Option1") %>'/>
<br />
<asp:RadioButton ID="opt2" runat="server" GroupName="Radio" Text='<%#Eval("Option2") %>'/>
<br />
<asp:RadioButton ID="opt3" runat="server" GroupName="Radio" Text='<%#Eval("Option3") %>' />
<br />
<asp:RadioButton ID="opt4" runat="server" GroupName="Radio" Text='<%#Eval("Option4") %>'/>
<br />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:HiddenField ID="hidvalue" runat="server" EnableViewState="true" />
<asp:Button ID="Submitbtn" runat="server" Text="Submit" style="float:right;"
onclick="Submitbtn_Click"/>
</div>
and here is my c# code in gridview paging
protected void examgrid_RowCommand(object sender, GridViewCommandEventArgs e)
{
DBClass db = new DBClass();
for (int i = 0; i < examgrid.Rows.Count; i++)
{
Label question = (Label)examgrid.Rows[i].Cells[0].FindControl("ques");
HiddenField quesid = (HiddenField)examgrid.Rows[i].Cells[0].FindControl("Question_Id");
RadioButton rd1 = (RadioButton)examgrid.Rows[i].Cells[0].FindControl("opt1");
RadioButton rd2 = (RadioButton)examgrid.Rows[i].Cells[0].FindControl("opt2");
RadioButton rd3 = (RadioButton)examgrid.Rows[i].Cells[0].FindControl("opt3");
RadioButton rd4 = (RadioButton)examgrid.Rows[i].Cells[0].FindControl("opt4");
string user = "Arun";
if (rd1.Checked == true || rd2.Checked == true || rd3.Checked == true || rd4.Checked == true)
{
if (rd1.Checked == true)
{
db.InsAnswer(user, question.Text, rd1.Text);
Session["selectedOption_"+quesid+"_Answer"]=rd1.Text;
}
else
if (rd2.Checked == true)
{
db.InsAnswer(user, question.Text, rd2.Text);
Session["selectedOption_"+quesid+"_Answer"]=rd2.Text;
}
else if (rd3.Checked == true)
{
db.InsAnswer(user, question.Text, rd3.Text);
Session["selectedOption_"+quesid+"_Answer"]=rd3.Text;
}
else if (rd4.Checked == true)
{
db.InsAnswer(user, question.Text, rd4.Text);
Session["selectedOption_"+quesid+"_Answer"]=rd4.Text;
}
}
else
{
for (int j = 0; j < examgrid.Rows.Count; j++)
{
Label ques = (Label)examgrid.Rows[j].Cells[0].FindControl("ques");
int y = db.select_QuestionId(ques.Text);
string selected_option = db.Select_Ansqwer(question.Text, user);
if (Session["selectedOption_"+y+"_Answer"]==selected_option )
{
if (selected_option == rd1.Text)
{
rd1.Checked = true;
}
else if (selected_option == rd2.Text)
{
rd2.Checked = true;
}
else if (selected_option == rd3.Text)
{
rd3.Checked = true;
}
else if (selected_option == rd4.Text)
{
rd4.Checked = true;
}
}
}
}
}
}
|
|
|
|
|
Generally the implementation is to rebind the grid on page change that leads to loss of any selection made.
If you want to persist selection across various pages, you need to maintain the selection somewhere or use client side pagination avoiding rebind on page change. Following article demonstrates one of the ways to handle it: Maintaining States of Selected CheckBoxes in Different Pages inside the GridView[^]
|
|
|
|
|
|
If i have to give an opinion,i'll say that use javascript to store the value corresponding to the question no and show that everytime. By default keep nothing in the radiobutton.
Hope this helps.
|
|
|
|
|
I'm trying to implement the sync solution using Microsoft Sync Framework. The server will be SQL server database contains the documents in FileStream and client will be the File system (Windows OS).Do anybody have any idea on this. My application scenario is :The database server contains the File/Documents in the form of byte array by the FileStream mechanism from SQL server. And the Sync activity will syncronize the documents from SQL server to any given file system. Please help me out.
Regards
|
|
|
|
|
I want to send email from my alihusain_77@yahoo.com account to sanabarq2000@gmail.com account. I want to know what I should write in the web.config to handle this using the VB.net coding
|
|
|
|
|
Lots of suggestions here[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Hi,
set like this:
<system.net >
<mailSettings>
<smtp deliveryMethod="Network" from="someaddress@classifiedspak.com">
<network
host="mail.classifiedspak.com"
userName="someaddress@classifiedspak.com "
password="*************"
port="25" />
</smtp>
</mailSettings>
</system.net>
Comm100 - Leading Live Chat Software Provider
modified 28-May-14 1:46am.
|
|
|
|
|
i want to develop a facility for image album on my website
1 upload photo category wise
2 view photo category wise
|
|
|
|
|
And the issue is?
Here is what is expected of enquirers:
1. TRY first what you want to do! You may find that it's not that hard.
2. Formulate what was done by you that looks like an issue/not working.
Member 7767311 wrote: develop a facility for image album on my website
Develop a website that has possibility of uploading images and view uploaded image. There are numerous articles on the same on web.
|
|
|
|
|
help me int his..,
<script type="text/javascript">
function isCapslock(e) {
e = (e) ? e : window.event;
var charCode = false;
if (e.which) {
charCode = e.which;
} else if (e.keyCode) {
charCode = e.keyCode;
}
var shifton = false;
if (e.shiftKey) {
shifton = e.shiftKey;
} else if (e.modifiers) {
shifton = !!(e.modifiers & 4);
}
if (charCode >= 97 && charCode <= 122 && shifton) {
return true;
}
if (charCode >= 65 && charCode <= 90 && !shifton) {
return true;
}
alert("CpasOn");
//return false;
}
</script>
<asp:TextBox ID="Password" runat="server" TextMode="Password" Width="150px" onkeypress="return isCapslock(this)"
></asp:TextBox>
if i press caps lock button nor not it gives me the message Capslock is on...,?
|
|
|
|
|
There's a blog post here ^[^] that claims to detect Caps Lock, but I haven't tried it.
Personally I like this solution[^] which just checks if the character entered is in Caps. If it is, and the ShiftKey is pressed, then Caps Lock is probably on
var s = String.fromCharCode(e.which);
if ( s.toUpperCase() === s && s.toLowerCase() !== s && !e.shiftKey ) {
alert('caps is on');
}
|
|
|
|
|
|
Hello Everybody, I want to develop an asp.net application.
I want to layer it in such a way that the data layer, data access layer and Business Logic Layer are designed in such a way that these layers could be used for any application UI such as silver light, windows apps, WPF ,android apps and ipad apps.
To achieve this I was planning to develop the BL layer using restful services and WCF.
BL layer will be the one interacting with the UI. I have seen lots of debates on this. I feel what I am planning is correct but the application will be huge around 3000 or more web pages and around 1000 table, I want to feel confident I am not going on a wrong track.
Any suggestion and advice will be appreciated.
Regards
|
|
|
|
|
here is my piece of code
alter procedure mdi_anu
(
@entry_date varchar(20),
@updated_date varchar(20),
@status varchar(20),
@cno varchar(20),
@eno varchar(20))
as
declare @SQL varchar(max)
set @SQL='SELECT * FROM anu123 where 1=1 '
if (@status='ALL')
begin
set @status='ALL'
end
if (@status='A')
begin
set @status='A'
end
if (@status='R')
begin
set @status='R'
end
if (@status='D')
begin
set @status='D'
end
if (@status='P')
begin
set @status='P'
end
if (@entry_date<>'' and @updated_date<>'')
begin
set @entry_date =CONVERT (datetime, @entry_date, 103)
set @updated_date= CONVERT(datetime, @updated_date, 103)
set @SQL=@SQL+'and entry_date>=''' +@entry_date+'''and updated_date<='''+@updated_date+''''
end
if (@cno<>'')
begin
set @cno=@cno
set @SQL=@SQL+'and cno=''' +@cno
end
if (@eno<>'')
begin
set @eno=@eno
set @SQL=@SQL+'and eno=''' +@eno
end
exec (@SQL)
End
Can anyone tell me,where am wrong? stuck from 2 hr. Saying incorrect syntax near the last end
|
|
|
|
|
U have to write BEGIN Keyword after As Statement
|
|
|
|
|
Hey i got it. but that's not compulsory i guess.
|
|
|
|
|
alter procedure mdi_anu
(
@entry_date varchar(20),
@updated_date varchar(20),
@status varchar(20),
@cno varchar(20),
@eno varchar(20)
)
as
begin
declare @SQL varchar(max)
set @SQL='SELECT * FROM anu123 where 1=1 '
--if (@status='ALL')
-- begin
-- set @status='ALL'
-- set @SQL=@SQL + 'and status=''' +@status
--end
if (@status='A')
begin
set @status='A'
--set @SQL=@SQL+' and status='''+@status
end
if (@status='R')
begin
set @status='R'
set @SQL=@SQL+' and status=''' +@status
end
if (@status='D')
begin
set @status='D'
set @SQL=@SQL+' and status=''' +@status
end
if (@status='P')
begin
set @status='P'
set @SQL=@SQL+' and status=''' +@status
end
if (@entry_date<>'' and @updated_date<>'')
begin
set @entry_date =CONVERT (datetime, @entry_date, 103)
set @updated_date= CONVERT(datetime, @updated_date, 103)
set @SQL=@SQL+'and entry_date>=''' +@entry_date+'''and updated_date<='''+@updated_date+''''
end
if (@cno<>'')
begin
set @cno=@cno
set @SQL=@SQL+'and cno=''' +@cno+
end
if (@eno<>'')
begin
set @eno=@eno
set @SQL=@SQL+'and eno=''' +@eno+
end
exec (@SQL)
end
the error which m getting is that,suppose m choosing 'D' as my input in the status i get
"Unclosed quotation mark after the character string 'D'.
Incorrect syntax near 'D'."
Whats the problem?
|
|
|
|
|
May be you should append a single quotes after +@status in all your if conditions, if it a varchar field?
|
|
|
|
|
Include a space before and after every string. For example instead of writing 'and eno=''' write ' and eno='' '
Hope it helps. If it does not instead of exec(@SQL) in your SP write print(@SQL) and you will have the complete SQL Query. That will clear the picture to a good deal where the error is.
|
|
|
|
|
Hi,
I have a members website and every memeber will have his images saved ina folder on host.
I wanted to ask what's best way to do it:
/member_id/images
or
/member_guid/images
Technology News @ www.JassimRahma.com
|
|
|
|