Custom validator validating multiple controls

Then in your validator, you could show the error message if that item is not available in that color.

Is there a way to have the custom validator take the input from two controls, say for example two check boxes and make sure that only one is checked?

Net, when you use a Custom Validator, it is easy to make it validate one control. Instead you add the following code to your aspx/ascx file: The “Validator Hookup Control ID” method used above, is automatically injected into the page for you by ASP.

But how do you use it to validate multiple controls (for eg: you want to make sure that if the City field has been filled out then you want the State field to also be filled out). Net whenever you use a validation control in your page.

The control toolkit didn't work for two reasons.

But it does not work if I am not adding customvalidator. This method works fine otherwise when I am validating in date fields directly but I am trying to implement it using customvalidator.

They also have complete client-side implementation that allows DHTML-supported browsers (such as Microsoft Internet Explorer 4.0 or later) to perform validation on the client.

Client-side validation enhances the validation process by checking user input before it is sent to the server.

For example, if you were selling clothes you could have a dropdown for the type of item and one for color selection. If in doubt please contact the author via the discussion board below.

NET validator works (in particular the Custom Validator). Custom Validator is a suitable for the following scenario: This entry was posted on Thursday, June 23rd, 2011 at am and is filed under Uncategorized.

This control has almost the same attributes as the other validation controls, but with Custom Validator you can specify your own method (Server code and Client script) to validate. You can follow any responses to this entry through the RSS 2.0 feed.

To create a client-side validation function, first add the server-side validation function described earlier.

Next, add the client-side validation script function to the page.

Custom validator validating multiple controls