• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 269
  • Last Modified:

RequiredFieldValidators - how to require that 1 of 2 questions be answered

Is there a way using the built-in validators in ASP.NET (Visual Studio .NET 2003) to have a validator require that one of two fields be filled in (but not both)?
0
sah18
Asked:
sah18
1 Solution
 
naveenkohliCommented:
No, you can't do it with built-in validators. But you can always write custom validator or do client side validation yourself.
See the following link.. It shows how custom validation can be added for any kind of control.

http://www.netomatix.com/Development/DropDownCustomValidator.aspx
0
 
sah18Author Commented:
This is very helpful.  Thank you for your quick response!
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now