Wednesday, 22 July 2009

ASP.NET CustomValidator with Javascript

To use CustomValidator with client side javascript validation, we need to implement a javascript with two parameters.


function YourFunctionName(source, arguments)



Set property ClientValidationFunction to the name of your javascript at CustomValidator control.

arguments.Value is the data that we will be validated.

arguments.IsValid indicates validation success or failure.

If the validation is passed, we set arguments.IsValid = true. False otherwise.

No comments: