the code is given below
<script type="text/jscript">
// Check the length of the textbox
//for new
function Length_Phone1TextField_Validator()
{
if ((aspnetForm.ctl00_ProfilePlaceHolder_txtPhone1.value.length > 2))
{
aspnetForm.ctl00_ProfilePlaceHolder_txtPhone2.focus();
return (false);
}
return (true);
}
<script>
and in cs file its code like this
this.txtPhone1.Attributes.Add("onKeyup", "return Length_Phone1TextField_Validator()");
Its not working in firefox but in IE and Safari