|
-
May 12th, 2004, 04:31 PM
#1
Thread Starter
Addicted Member
User controls and validation
I have a User Control that contains a dropdown list and a Required field validator. The dropdown list is a list of states. On my web form, I have 2 instances of this user control. My problem is with the Validator. One instance of the control on the web form requires that the user choose a state from the dropdown list, but the other does not. If either one of the 2 instances is left blank, the Required Field validator shows the * text beside both of them. Is there a way to set a property or something in the user control from the Web form to indicate whether the field is required or not for that particular instance and if so whether to enable the validator control or not?
The way it works now is confusing to the user because an * appears next to a field that is not required because a different required field was left blank.
I would like to avoid creating two user controls if possible.
Please help!
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|