Thursday, 16 December 2010

[ASP.NET] Pass your own arguments to the ClientValidationFunction in a CustomValidator

When using a CustomValidator in you can specify a ClientValidationFunction to run on your client side. This function need to have 2 parameters (sender, args). The sender is the customvalidator control and the args is where you can specify the result of your validation(args.IsValid) and also access to the value of the control attached to you custom validator(args.Value). This is very useful for more complex validation on client side.

No comments: