multi line text box max length

  • Thread starter Thread starter Kieran Breen
  • Start date Start date
K

Kieran Breen

Hiya,

I was just wondering if anyone knows how to impose a maximum length on a
muti line text box in asp.net. There is a parameter for this but even when
its set it dosent seem to make any difference.

Thanks in advance,

Kieran.
 
Validation.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
try this :

txtRemarks.Attributes.Add("onkeypress","return remarksLength()");

function remarksLength()
{
if (document.all('txtRemarks').value.length >= 155)
{
alert('Remarks cant be more than 155 characters');
return false;
}
return true;
}


Vinay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top