multi line text box max length

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.
 
K

Kevin Spencer

Validation.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
G

Guest

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
 
Joined
Jun 14, 2007
Messages
1
Reaction score
0
Good

Vinay,

It is very simple to validate the the multiline text box,instead of using custom validations.Thanks for your good thought.


Thanks,
Natarajan.M
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top