Custom validator in Web User Control

dave68

Newcomer
Joined
Nov 10, 2004
Messages
1
Has anyone figured out how to get a custom validator working in a custom control?

I am building a simple control with a textbox and a validator. It needs to be a custom validator as I am checking whether the input is a valid SEDOL number (this has a check digit).

My question is - where do I put the validation code?
 
If you are creating a Custom Validator then you would need to put the validation code within the Custom Validator Control's ServerValidate method.
If you also require some client side validation then you would create a client side JavaScript function within the ascx page and set the custom validator control's clientvalidationfunction to be the name of the JavaScript function.
 
Back
Top