Click here to Skip to main content
15,916,692 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I had already done the connection with database
but when I increase the value in the radio button list it doesn't increase the...........

means
When question is changed it's option also changed
but in back hand it value is not come of that option it display first question option,,,,,

So plz give me answer...............


here is code......

VB
Label2.Text = Convert.ToString(ds.Tables(0).Rows(Session("point"))(1))
RadioButtonList1.Items(0).Text = (ds.Tables(0).Rows(Session("point"))(2))
RadioButtonList1.Items(1).Text = Convert.ToString(ds.Tables(0).Rows(Session("point"))(3))
RadioButtonList1.Items(2).Text = Convert.ToString(ds.Tables(0).Rows(Session("point"))(4))
RadioButtonList1.Items(3).Text = Convert.ToString(ds.Tables(0).Rows(Session("point"))(5))


SQL
If CInt(Label4.Text) > 0 Then
          str = RadioButtonList1.SelectedValue
          con.Open()
          cmd = New OleDbCommand("select * from unixquedb where qno=" & CInt(Label4.Text) & " and ans ='" & str & "' ", con)
          dr1 = cmd.ExecuteReader()
          If dr1.Read = True Then
              ' "select * from unixquedb where ans ='" & str & "'" Then
              marks = +1
          End If
      End If
Posted
Updated 26-Aug-11 1:01am
v2
Comments
[no name] 15-Aug-11 9:15am    
Please clarify your question.
maestro_88 26-Aug-11 8:28am    
Is this regarding any ONLINE QUIZ like application?If i get you correct,whether the question or ans(options)change when a radio button click happens?

1 solution

A seemingly random collection of words doesn't make it a question. If you can't speak enloish, find someone that does (or at least does it better) to post the quetion for you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900