A
ani
I have been posting this question for the past 2 weeks and
there wasn't any response. I really don't understand why I
am not getting any responses. Does my question sound very
stupid? Anyway, here I am asking again. Someone please
please help me!!
How do I add a radiobuttonlist within a datalist
programatically.
My actual problem is with retrieving the user-input and
the form values at the same time.
I have a datalist control in my aspx page(this is
paginated and everytime submits to itself). I am
calling a function within my datalist that returns a html
control (radio button ) in the form of the string. I also
have asp server controls(labels) in the datalist. When
the form is processed, I am retrieving the values of the
radio buttons through Request.form. To retrieve the values
of the asp server controls , I am using FindControl
method. But this is written in the Page_Load method, so
it returns the values of the current page before the page
gets submitted. I want the values after the page gets
submitted. How do I retrieve them.
If I use onserverclick on my button (which is a html
control with rollover capability <a href>) , the
onclick doesn't work fine for validating the html
controls. I don't have runat=server on my form tag when I
have onclick attribute on the button. I am new to
asp.net. I am not able to use both onclick and
onserverclick at the same time. Why is it so..
Please help!!
<form id="frmQuestion" method="post" >
<ASPataList id="Questions" ShowHeader="false"
ShowFooter="false" runat="server" >
<ItemTemplate>
<TABLE ALIGN="left" >
<td>
<asp:Label runat="server" Text='<%# DataBinder.Eval
(Container.DataItem, "MainQuestion_ID")%> '
ID="QuestionID" NAME="QuestionID">
</asp:Label>
</td>
<td>
<asp:Label runat="server" Text='<%# DataBinder.Eval
(Container.DataItem, "MainQuestion_Txt")%>'
ID="QuestionTxt" NAME="QuestionTxt">
</asp:Label>
</td>
<td >
<%# DisplayAnswers(DataBinder.Eval
(Container.DataItem, "MainQuestion_ID"),DataBinder.Eval
(Container.DataItem, "QuestionTypeID")) %>
</td>
</tr></TABLE>
</ItemTemplate>
</ASPataList>
<table align=right >
<tr><td>
<a id=btnForward href="#"
onMouseOut="bforward.src='images/bforward.gif';"
onMouseOver="bforward.src='images/bforward_f2.gif';"
runat=server onclick="return validate();"><IMG
SRC="images/bforward.gif" ALT="" NAME="bforward"
ID="bforward" WIDTH="78" HEIGHT="24" BORDER="0"></A>
</td></tr></table>
I would like to retrieve the question id and the answer
(user-input) at the same time on click of the button.
The
questionaire is paginated and this is the only form i am
using.
The code behind looks somewhat this way:
Sub Page_Load(ByVal Sender As Object, ByVal E As
EventArgs)
Dim oDt As DataTable
Dim oQuestion As Question ('This is the
class
in my business layer)
oQuestion = New Question
Questions.DataSource = New DataView(oDt)
Questions.DataBind()
End Sub
how do I get questionid's and user-input to
insert into the database. There can be subquestions
there wasn't any response. I really don't understand why I
am not getting any responses. Does my question sound very
stupid? Anyway, here I am asking again. Someone please
please help me!!
How do I add a radiobuttonlist within a datalist
programatically.
My actual problem is with retrieving the user-input and
the form values at the same time.
I have a datalist control in my aspx page(this is
paginated and everytime submits to itself). I am
calling a function within my datalist that returns a html
control (radio button ) in the form of the string. I also
have asp server controls(labels) in the datalist. When
the form is processed, I am retrieving the values of the
radio buttons through Request.form. To retrieve the values
of the asp server controls , I am using FindControl
method. But this is written in the Page_Load method, so
it returns the values of the current page before the page
gets submitted. I want the values after the page gets
submitted. How do I retrieve them.
If I use onserverclick on my button (which is a html
control with rollover capability <a href>) , the
onclick doesn't work fine for validating the html
controls. I don't have runat=server on my form tag when I
have onclick attribute on the button. I am new to
asp.net. I am not able to use both onclick and
onserverclick at the same time. Why is it so..
Please help!!
<form id="frmQuestion" method="post" >
<ASPataList id="Questions" ShowHeader="false"
ShowFooter="false" runat="server" >
<ItemTemplate>
<TABLE ALIGN="left" >
<td>
<asp:Label runat="server" Text='<%# DataBinder.Eval
(Container.DataItem, "MainQuestion_ID")%> '
ID="QuestionID" NAME="QuestionID">
</asp:Label>
</td>
<td>
<asp:Label runat="server" Text='<%# DataBinder.Eval
(Container.DataItem, "MainQuestion_Txt")%>'
ID="QuestionTxt" NAME="QuestionTxt">
</asp:Label>
</td>
<td >
<%# DisplayAnswers(DataBinder.Eval
(Container.DataItem, "MainQuestion_ID"),DataBinder.Eval
(Container.DataItem, "QuestionTypeID")) %>
</td>
</tr></TABLE>
</ItemTemplate>
</ASPataList>
<table align=right >
<tr><td>
<a id=btnForward href="#"
onMouseOut="bforward.src='images/bforward.gif';"
onMouseOver="bforward.src='images/bforward_f2.gif';"
runat=server onclick="return validate();"><IMG
SRC="images/bforward.gif" ALT="" NAME="bforward"
ID="bforward" WIDTH="78" HEIGHT="24" BORDER="0"></A>
</td></tr></table>
I would like to retrieve the question id and the answer
(user-input) at the same time on click of the button.
The
questionaire is paginated and this is the only form i am
using.
The code behind looks somewhat this way:
Sub Page_Load(ByVal Sender As Object, ByVal E As
EventArgs)
Dim oDt As DataTable
Dim oQuestion As Question ('This is the
class
in my business layer)
oQuestion = New Question
Questions.DataSource = New DataView(oDt)
Questions.DataBind()
End Sub
how do I get questionid's and user-input to
insert into the database. There can be subquestions