Posted on: 4/9/2012 5:23:13 AM | Views : 337

I have 4 radio buttons to choose as an answer and in databse a table named quser with the fields :
qid,uans,result.
I am thinking to do it in this way:
When the user clicks on his answer i.e. radiobutton then it should get stored in the uans field.
The code I have written is :
Protected Sub RadioButtonList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButtonList1.SelectedIndexChanged
If RadioButtonList1.SelectedItem.Text Then
cmd = New SqlCommand("insert into quser (uans) values('" + RadioButtonList1.SelectedItem.Text + "' )", con)
End If
End Sub
Its not giving any errors but after running page,the data does'n get stored in database.
I am not so sure of the code.
I just tried it.
...

Go to the complete details ...