Site Owners Forums - Webmaster Forums

Site Owners Forums - Webmaster Forums (http://siteownersforums.com/index.php)
-   ASP (http://siteownersforums.com/forumdisplay.php?f=11)
-   -   ASP multine textbox maxlength (http://siteownersforums.com/showthread.php?t=52188)

mjvndhsb 11-01-2011 12:15 AM

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?

ruixuan 02-23-2012 11:04 PM

Asp.net asp.net Fibroids Treatment

davikerkrish 08-16-2012 04:15 AM

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.

henryc10 10-30-2012 07:44 PM

try this



$(document).ready(function(){
var MaxLength = 250;
$('#txtValue').keypress(function(e)
{
if ($(this).val().length >= MaxLength)
{
e.preventDefault();
}
});});

vivekaryan 04-19-2013 03:24 AM

oh thanks.............its working.

samuelblack 04-30-2013 12:10 AM

character limitation
 
here you can try by giving rows n colums value.

Die_heart 01-02-2014 12:08 AM

Asp.net asp.net

alligatortek001 03-11-2014 11:45 PM

ya its possible..


All times are GMT -7. The time now is 10:12 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.