=======================================================
1. Create Javascript function
function CheckLength(events, args)
{
var x = (document.getElementById(txtSKU).value);
if(x != '')
{
if(x.length < isvalid =" false;" isvalid =" true;">
2. Use one Custom Validator
EnableClientScript="true" Display="None" ClientValidationFunction="CheckLength"
3. Declare Variable in CS file
Page.ClientScript.RegisterStartupScript(this.GetType(), "CustomValidationTestForSKU", "var txtSKU='" + this.txtSKU.ClientID + "';", true);
0 comments:
Post a Comment