Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
12-01-2009, 12:14 AM #1
- Join Date
- Nov 2009
- Thanked 0 Times in 0 Posts
I am using ASP validators and I have a contact form. I want to be able to have a phone and email radio button group. The email textbox also has a RegularExpressionValidator
If the phone item is selected then I want the validation to be enabled on the phone text box making it mandatory while the email text box isn't, and if they choose the email as the contact it will be reversed.
I want to be able to do this without having to do a postback.
I already have the logic on the code behind and the enquiry object.
12-01-2009, 01:54 AM #2
Well, ASP.NET isn't really set up to do this, but it's easy enough to do in pure JS code as an "add-on" without ASP.NET being aware of it.
But if you have *other* ASP.NET-driven validation taking place, then you have to figure out how to "hook in" this validation.
If you could remove the ASP.NET RegExp validator from the <form> and then bring up the page in your browser and do a VIEW==>>SOURCE to see the HTML ASP.NET is producing and copy that here, then it would be a lot easier to try to help you. Or just show us the site live, if that's easier/possible.Be yourself. No one else is as qualified.