By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,871 Members | 649 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,871 IT Pros & Developers. It's quick & easy.

make a textbox required through a radio button

P: 2
Hello

I need help whit a validation control.

I have a radio button list which i made required:

Expand|Select|Wrap|Line Numbers
  1. <asp:radiobuttonlist id="_AlergiasSN" runat="server">
  2.  <asp:listitem id="_AlergiasS" runat="server" value="Yes" />
  3.  <asp:listitem id="_AlergiasN" runat="server" value="No" />
  4. </asp:radiobuttonlist>
  5. <asp:RequiredFieldValidator id="val_AlergiasSN" runat="server" ControlToValidate="_AlergiasSN" Display="None" EnableClientScript="false"></asp:RequiredFieldValidator>
and a textbox which i need to make required depending on the radio button chosen:

Expand|Select|Wrap|Line Numbers
  1. <asp:TextBox id="_Alergias" runat="server" MaxLength="200"></asp:TextBox>
  2.  
how can i achieve this ( i need to make required depending on the radio button chosen)

anyone? please?? :confused: :(
Aug 14 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.