troubleshooting Question

How to disable/invisible the group validator in a web form?

Avatar of viola123
viola123 asked on
Web DevelopmentC#ASP.NET
4 Comments1 Solution408 ViewsLast Modified:
hi All,
i have web form, it has two radio buttons and two panels, each panel will be made visible/invisible based on the radion button selection. there are a few RequiredValidators at the end of the form(not locate in panels). i grouped the validators based on panels.
my question is: how to disable/invisible the group validator based on the selection of the radio button OR based on the visiblity/invisibity of panels?

my code sample:
<asp:RequiredFieldValidator ID="AddressLine1Validator" runat="server" ErrorMessage="Address Line 1 required" ValidationGroup="valIndivDelGroup" ControlToValidate="txtBox_IndivDelAddressLine1" Display="None"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="PostcodeValidator" runat="server" ErrorMessage="Postcode required" ValidationGroup="valIndivDelGroup" ControlToValidate="txtBox_IndivDelPostcode" Display="None"></asp:RequiredFieldValidator>

thanks a lot

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros