Setting autopostback on dynamic control RadioButtonList
I am creating a series of radiobuttonlists to display on a web page. I have created a handler for the SelectedIndexChanged event, but it does not fire when I change the selection--perhaps because autopostback is defaulting to false (?). How can I set the autopostback to true on a dynamically created radiobuttonlist?
Lapin_agile
P.S. If this is not the best forum for this question, ,please let me know where to post this.
In Page_Load:
Dim rblxAsNew RadioButtonListWith rblx.ID = "testrb"
.CssClass = "quizansw"
EndWithAddHandler rblx.SelectedIndexChanged,AddressOf rbQuizQuestion_SelectedIndexChangedpnl1.Controls.Add(rblx)
Dim liAsNew ListItemWith li.Text = "option 1"
.Value = "True"
.Selected =
FalseEndWithrblx.Items.Add(li)
Dim lsAsNew ListItemWith ls.Text = "option 2"
.Value = "True"
.Selected =
TrueEndWithrblx.Items.Add(ls)

