![]() |
ASP multine textbox maxlength
I am using ASP.NET in Visual Studio .NET, I am making a form that contains a comments box. For that I used a multiline textbox. My problem is that I want it to have a maximum of 250 characters but maxlength does not apply to multiline texbox. How can I fix it?
|
Asp.net asp.net Fibroids Treatment
|
If you want to let the user know if he exceeded the amount of characters as he writes, you could use a java script function attached to key press event. This function would test the length of the input and cancel the character rendering if the max length was reached.
|
try this
$(document).ready(function(){ var MaxLength = 250; $('#txtValue').keypress(function(e) { if ($(this).val().length >= MaxLength) { e.preventDefault(); } });}); |
oh thanks.............its working.
|
character limitation
here you can try by giving rows n colums value.
|
Asp.net asp.net
|
ya its possible..
|
All times are GMT -7. The time now is 10:12 AM. |
Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.