If in update panel
ScriptManager.RegisterExpandoAttribute(CustomValidatorTextBoxDOB, CustomValidatorTextBoxDOB.ClientID, "Date", TextBoxDOB.ClientID, false);
in in page
Page.ClientScript.RegisterExpandoAttribute(CustomValidatorTextBoxDOB.ClientID, "Date", TextBoxDOB.ClientID, false);
ClientValidationFunction="ClientValidate"
function ClientValidate(sender, arguments)
{
arguments.IsValid = false;
return false;
}
OnServerValidate="DateValidate"
protected void DateValidate(object source, ServerValidateEventArgs args)
{
args.IsValid = CommonClass.ValidateDate(args.Value);
}
No comments:
Post a Comment