miyengar
asked on
Textbox maxlength
I want to set the maxlength property of a textbox with the textmode as multiline. How can i use the maxlength property to set my textbox in such a way it does not let the user to enter more than the maxlength property. Again it is a multiline textbox.
here is another solution found via google search (http://www.google.com/search?hl=en&q=multiline+maxlength)
http://www.codeproject.com/aspnet/textlengthvalidator.asp
http://www.codeproject.com/aspnet/textlengthvalidator.asp
ASKER
I want to use custom validator to check the length. Can someone help me with the code
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The above code works fine but had a question on that:
5000 the max length is being hardcoded. Instead of hard coding, in another textbox I want to enter maxlength which may vary each time and then use that value in my program rather than hardcoding 5000 as max length. Any solution on that. I appreciate ur help.
5000 the max length is being hardcoded. Instead of hard coding, in another textbox I want to enter maxlength which may vary each time and then use that value in my program rather than hardcoding 5000 as max length. Any solution on that. I appreciate ur help.
taken from
http://www.extremeexperts.com/Net/tools/MultiLineTextBox.aspx