Thursday, November 24, 2011

Limit no of character in textbox with count in Asp.net using javascript

<script type="text/javascript">
 {if (field.value.length > maxlimit)


{return false;</script>

}
}
function textCounter(field,maxlimit)


protected void Page_Load(object sender, EventArgs e)"onkeydown", "return textCounter(this, 5)");"onkeyup", "return textCounter(this, 5)");"onmousedown","return textCounter(this, 5)");"onmouseup","return textCounter(this, 5)");"onblur", "return textCounter(this, 5)");
{
txtmaxlen.Attributes.Add(
txtmaxlen.Attributes.Add(
txtmaxlen.Attributes.Add(
txtmaxlen.Attributes.Add(
txtmaxlen.Attributes.Add(

}

No comments:

Post a Comment