I
Igor
RadioButton have property Checked (true or false).
If I make RadioButtons with code, without drawing by mouse than I have
problems. I write like this:
Dim rb(0 To 2) As RadioButton
Dim n As Integer
For n = 0 To 2
rb(n) = New RadioButton
rb(n).Text = "Text: " + CStr(n)
Panel1.Controls.Add(rb(n))
Next
Session("rb") = rb
Than I call this RadioButton array from session to other procedure:
Dim rb(0 To 2) As RadioButton
rb = Session("rb")
Response.Write(rb(0).Checked)
Response.Write(rb(1).Checked)
Response.Write(rb(2).Checked)
Problem is next: Every RadioButton have property Checked=False even when
user check some button. Text property is ok, but checked property is False
every time.
How to fix it?
If I make RadioButtons with code, without drawing by mouse than I have
problems. I write like this:
Dim rb(0 To 2) As RadioButton
Dim n As Integer
For n = 0 To 2
rb(n) = New RadioButton
rb(n).Text = "Text: " + CStr(n)
Panel1.Controls.Add(rb(n))
Next
Session("rb") = rb
Than I call this RadioButton array from session to other procedure:
Dim rb(0 To 2) As RadioButton
rb = Session("rb")
Response.Write(rb(0).Checked)
Response.Write(rb(1).Checked)
Response.Write(rb(2).Checked)
Problem is next: Every RadioButton have property Checked=False even when
user check some button. Text property is ok, but checked property is False
every time.
How to fix it?