I have a definite need to control how any text is entered in a multi-line text field (ASP: TextBox)
At first I, although I could only control it using JavaScript, but it seems that I can get closer, but not 100% of what I need.
Now I'm wondering if I need to write a control from scratch (I never did this), or if I can inherit from a TextBox and be able to get what I need.
Requirements:
- MultiLine TextBox
- Ability to manage rows and columns
- Prefers to disable the scroll bar, which is disabled in the MultiLine text box.
- Validators can still be used.
- Word wrap
- MAXLENGTH
- If I set the columns to 26 and the rows to 4, the user should not have to enter more than 104 characters to enter (Here are the parts that I did not understand the output)
- The user cannot enter more than four lines, even if the maximum length has not reached.
The linear limit was indeed the biggest part of my problem.
If you enter:
a
b
from
d
I can check how many characters \n . However, if you enter:
+12345678901234567890123456
7890
from
d
Here they are wrapped so that there is one \n character or you enter:
This is a long piece of typed text.
from
d
The text is complete here, and you cannot just count the \n characters.
Chris source share