W
William LaMartin
If I create a RadioButtonList with, say, two items, then after the page
loads and I select one of the items and then click on a button whose click
event contains some code to display the RadioButtonlList's selected value,
there is nothing.
On a postback, with the dynamically created button list visible on the page
and the first item selected, if I try some code like "If
Me.RadioButtonList1.Items(0).Selected = True Then.......", then I get an
index out of range error. It is like the RadiobuttonList does not really
exits.
For RadioButtonLists that are simply dropped on a page with their values set
in the properties window in Visual Studio, there is no problem.
So, how does one determine whether a dynamically created RadioButtonList
item is selected and if so what its selected value is?
loads and I select one of the items and then click on a button whose click
event contains some code to display the RadioButtonlList's selected value,
there is nothing.
On a postback, with the dynamically created button list visible on the page
and the first item selected, if I try some code like "If
Me.RadioButtonList1.Items(0).Selected = True Then.......", then I get an
index out of range error. It is like the RadiobuttonList does not really
exits.
For RadioButtonLists that are simply dropped on a page with their values set
in the properties window in Visual Studio, there is no problem.
So, how does one determine whether a dynamically created RadioButtonList
item is selected and if so what its selected value is?