M
MattB
Hi, I'm working with a RadioButtonList in a Web Form and it's not behaving
as I was expecting. I have it bound to a table in a dataset and it displays
like I want it to. Here's that chunk of code:
With RadioButtonList1
..DataSource = dsModifiers.Tables(1)
..DataTextField = "descrip"
..DataBind()
End With
-------------------------
Now my plan was to grab the SelectIndex Property when the form is submitted
and use that index to grab multiple values from the corresponding row in the
table.
The problem I'm having, is in the click event I always get a value of -1 for
RadioButtonList1.SelectedIndex when something is selected.
Is this a variable access issue between the Page_Load and Click events (I
didn't think it would be) or something else? Any hints for getting that
SelectIndex to be correct? Thanks!
--
Matt
"Gravity. It's not just a good idea, it's the law!"
as I was expecting. I have it bound to a table in a dataset and it displays
like I want it to. Here's that chunk of code:
With RadioButtonList1
..DataSource = dsModifiers.Tables(1)
..DataTextField = "descrip"
..DataBind()
End With
-------------------------
Now my plan was to grab the SelectIndex Property when the form is submitted
and use that index to grab multiple values from the corresponding row in the
table.
The problem I'm having, is in the click event I always get a value of -1 for
RadioButtonList1.SelectedIndex when something is selected.
Is this a variable access issue between the Page_Load and Click events (I
didn't think it would be) or something else? Any hints for getting that
SelectIndex to be correct? Thanks!
--
Matt
"Gravity. It's not just a good idea, it's the law!"