2
Answers

how to Limit number of character in each line in multiline textbox

djelloul reguieg

djelloul reguieg

15y
7.4k
1

Hi;
I have a multi line textBox;
I would like to limite number of line to three (3) and number of character in each line to (30).
how to do it please;
Thanks for your help;
Answers (2)
0
Danatas Gervi
NA 1.4k 0 15y

If you needs so strange behavior, I suggest you to write user control – 3 textboxes with textBox1.MaxLength = 30; - for each.

So you can write propertie in this user control – "Get Three Rows" – in this property collect texts from all textboxes.

0
Roei Bar
NA 7.8k 0 15y
here is a nice post from CodeProject, its basically a Javascript Validation for Textarea

http://www.codeproject.com/KB/aspnet/Extended_ASPNET_TextBox.aspx?display=Print

and another one

http://www.codeproject.com/KB/aspnet/Textarea_Length_Validator.aspx?df=100&forumid=278964&exp=0&select=1412646

dont forget to mark this as "Accepted Answer"