Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

validation for radio button

i have 2 radio buttons
Gender:radiobutton male,radiobutton female.
i want to make user to select any one.
which validation control i have to use.
[172 byte] By [syedwna] at [2007-11-11 10:28:43]
# 1 Re: validation for radio button
<asp:requiredfieldvalidator ControlToValidate="RadioButtonList" ErrorMessage="Please select one" Display="Dynamic" runat="server"/>
given that your radio buttons are in a list, and not separate radio buttons. It is best you make them in a list.
kashif_82 at 2007-11-11 23:11:48 >