Knowledge Sharing Man
You can control the length of the textbox in asp.net using maxlength property which is build in property but if you use the textarea and the multiline textbox you cannot use the maxlength property. The below is use full and I already tested this one. This is using javascript and using "onkeypress" and in my code 499 is length see below code:

Javascript:

function limitTextFiled(limittxtField, limittxtNum)
{
return (limittxtField.value.length <= limittxtNum);
}

In the aspx or webpage:

onkeypress="return limitTextFiled(this,499)"
Labels: | edit post
0 Responses

Post a Comment

LinkWithin

Popular Other Posts