I have a RadioButtonList on my webform with 4 items in it. When the user clicks on the OK button, it does a different thing depending on which radio button is selected. It does this by performing a SELECT CASE on the SelectedIndex. It works fine now, but what I want to do is add functionality to test for a certain condition at form load, and if the condition is true, I want to force the user to have the 4th item selected, and not let them change it. The following code works if I comment out the .visible=false statement. When I try to disable the control or make it invisible, it sets the selecteditem/selectedtext back to the first item.
Any advice on how to make this work? TIA!
MAC
Code:
rdoNewEdit_Reg.Visible = False
rdoNewEdit_Reg.Items("3").Selected = True
Any advice on how to make this work? TIA!
MAC