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 RadioButtonList

With rblx

.ID = "testrb"

.CssClass = "quizansw"

EndWith

AddHandler rblx.SelectedIndexChanged,AddressOf rbQuizQuestion_SelectedIndexChanged

pnl1.Controls.Add(rblx)

Dim liAsNew ListItem

With li

.Text = "option 1"

.Value = "True"

.Selected =False

EndWith

rblx.Items.Add(li)

Dim lsAsNew ListItem

With ls

.Text = "option 2"

.Value = "True"

.Selected =True

EndWith

rblx.Items.Add(ls)

[2320 byte] By [Lapin_Agile] at [2007-12-25]
# 1

hey dude,

don't know if your problem got solved but you have solved my problem by your question.

thanks

ASP.NETMSDN.COM at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic IDE...