Larry Brister
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>
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>
post your current script, then we can add to it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect
Thanks
Thanks
You are welcome :)