How to get value from dynamic radio button
-
Hi All, I'm working on a online survey. What I have accomplished is reading the table A (contain Question) and table B (contain Answer). I used Response.write() to format it to look like Section 1 ------------- Question 1 | Answer 1 | Answer 2 | Answer 3 | Answer 4 | Answer 5
Response.Write("<input id='" & "rad" & radIDCount & "' name='" & subDataReader("QUESTION_ID") & "' type='radio' value='" & subDataReader("ANSWER_ID") & "' runat='server'/>")
How do I loop thru all the radio button and submit the answer to the oracle database? I tried the FindControl but i get no luck. Someone guide me to the right direction? thanks -
Hi All, I'm working on a online survey. What I have accomplished is reading the table A (contain Question) and table B (contain Answer). I used Response.write() to format it to look like Section 1 ------------- Question 1 | Answer 1 | Answer 2 | Answer 3 | Answer 4 | Answer 5
Response.Write("<input id='" & "rad" & radIDCount & "' name='" & subDataReader("QUESTION_ID") & "' type='radio' value='" & subDataReader("ANSWER_ID") & "' runat='server'/>")
How do I loop thru all the radio button and submit the answer to the oracle database? I tried the FindControl but i get no luck. Someone guide me to the right direction? thanksSTI06 wrote:
How do I loop thru all the radio button and submit the answer to the oracle database?
Given that you don't create any sort of server controls at all, your only chance is if you look at the form variables and can find the one for your radio button by name in there.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Hi All, I'm working on a online survey. What I have accomplished is reading the table A (contain Question) and table B (contain Answer). I used Response.write() to format it to look like Section 1 ------------- Question 1 | Answer 1 | Answer 2 | Answer 3 | Answer 4 | Answer 5
Response.Write("<input id='" & "rad" & radIDCount & "' name='" & subDataReader("QUESTION_ID") & "' type='radio' value='" & subDataReader("ANSWER_ID") & "' runat='server'/>")
How do I loop thru all the radio button and submit the answer to the oracle database? I tried the FindControl but i get no luck. Someone guide me to the right direction? thanksHi, can u explain briefly? which datacontrol used to bind the value?
-
Hi, can u explain briefly? which datacontrol used to bind the value?
thanks for reply. I have add the placeholder at Page_load and now I'm able to the find control. How do I check the value of the radio button in the FindControl?
Dim radValue As New RadioButton radValue = phControl.FindControl("rad1") If radValue.Checked = True Then Response.Write("I'm selected") End If
Now I want to find the value of the radio button. any help?