A JavaScript function displayed below will takes care of a similar task.
function VerifyValidators()
{
//To verify the validators are passed in data validation.
//This Page_ClientValidate() function will return true if all the validation are passed else it returns false.
if (Page_ClientValidate() == true)
{
form1.submit();
}
}
The Page_ClientValidate() function will not be included in the page by default. To implement this function we need a minimum a single validation control. Then, this function is rendered as a part of any validation control by default. By using this function, we can check the Data Validation even before it gets posted to the server. Some times when using this functionality the page may not be posted to the server, then page has to be submitted to the server manually as given in the function or in any other way.
No comments:
Post a Comment