Link to home
Start Free TrialLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

Conditional Web Page required field validator

I have a web I inherited

There are two items which I need to link together

First...I can easily add the required field validator for either control but have it for the dropdown list only right now

What I need is that IF dropdown list selected value = "Yes"
THEN
The txtTravelCo_ is required to be filled in


<asp:DropDownList ID="ddlTravelAssign_" runat="server" CssClass="requiredDDL">
  <asp:ListItem Text="-- Select One --" Value=""></asp:ListItem>
  <asp:ListItem Text="Yes" Value="Yes"></asp:ListItem>
  <asp:ListItem Text="No" Value="No"></asp:ListItem>
</asp:DropDownList>


<asp:TextBox ID="txtTravelCo_" runat="server" ></asp:TextBox>
Avatar of Kyle Hamilton
Kyle Hamilton
Flag of United States of America image

post your current script, then we can add to it.
ASKER CERTIFIED SOLUTION
Avatar of Pryrates
Pryrates
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Larry Brister

ASKER

Perfect
Thanks
You are welcome :)