Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RadioButtonList

Status
Not open for further replies.

mikeyc330

Programmer
Oct 7, 2005
5
US
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.

Code:
            rdoNewEdit_Reg.Visible = False
            rdoNewEdit_Reg.Items("3").Selected = True

Any advice on how to make this work? TIA!

MAC

 
If you set server controls to be visible=false it means that they don't get rendered. If you want to hide them but still access them don't use this property (use CSS and set the display style to none).


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top