Click here to Skip to main content
15,921,174 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi i have a form which takes user information including its gender. this data is then fed into database. to capture gender i have use radiobutton list with two options either male or female forcing user to select one of them. what i really is is possible to unchecked the selected radiobutton after user information has beem sucessfully caputred. plz provide me with the proper/easy/hint to do the same
thanku
anoop
Posted

Hi Anoop,

You can set radiobuttonlist.selectedIndex = -1 to clear selection.

Thanks,
Swapnil.
 
Share this answer
 
RadioButtonList has a method ClearSelection.

C#
protected void Save_Click(object sender, EventArgs e)
       {
           genderlist.ClearSelection();
       }


This will resolve your issue.
 
Share this answer
 
Comments
Member 10253761 7-Oct-13 4:07am    
thanks a lot

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900