N
News
Hi,
I am new to asp.net and unfortunately, have to learn as I go.
Here is a "problem".
I have got two radio buttons No and Yes and text box that has to be fiiled
in only if Yes is clicked. How can I validate this?
Here is a code:
<asp:radiobuttonlist RepeatDirection=Horizontal RepeatLayout=Table
id="is_override" runat="server">
<asp:listitem text="No" Value="0"></asp:listitem>
<asp:listitem text="Yes" Value="1"></asp:listitem>
</asp:radiobuttonlist>
<asp:requiredfieldvalidator
id="RequiredFieldValidator_is_override"
runat="server"
ErrorMessage="You must choose a valid Override option."
ControlToValidate="is_override">
</asp:requiredfieldvalidator>
<asp:textbox size=50 MaxLength="100" id="reason" runat="server" Text="" />
<!--- here I need some type of validation if a user cliked Yes --->
Help is very much appreciated!
Thanks
I am new to asp.net and unfortunately, have to learn as I go.
Here is a "problem".
I have got two radio buttons No and Yes and text box that has to be fiiled
in only if Yes is clicked. How can I validate this?
Here is a code:
<asp:radiobuttonlist RepeatDirection=Horizontal RepeatLayout=Table
id="is_override" runat="server">
<asp:listitem text="No" Value="0"></asp:listitem>
<asp:listitem text="Yes" Value="1"></asp:listitem>
</asp:radiobuttonlist>
<asp:requiredfieldvalidator
id="RequiredFieldValidator_is_override"
runat="server"
ErrorMessage="You must choose a valid Override option."
ControlToValidate="is_override">
</asp:requiredfieldvalidator>
<asp:textbox size=50 MaxLength="100" id="reason" runat="server" Text="" />
<!--- here I need some type of validation if a user cliked Yes --->
Help is very much appreciated!
Thanks