Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > ASP

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 11-01-2011, 12:15 AM   #1
mjvndhsb
Registered User
 
Join Date: Jul 2011
Posts: 177
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?
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
mjvndhsb is offline   Reply With Quote

Old 02-23-2012, 11:04 PM   #2
ruixuan
Registered User
 
Join Date: Feb 2012
Posts: 98
Asp.net asp.net Fibroids Treatment
ruixuan is offline   Reply With Quote
Old 08-16-2012, 04:15 AM   #3
davikerkrish
Registered User
 
Join Date: Jul 2012
Posts: 111
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.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
davikerkrish is offline   Reply With Quote
Old 10-30-2012, 07:44 PM   #4
henryc10
Registered User
 
Join Date: Oct 2012
Posts: 33
try this

<asp:TextBox ID="txtValue" runat="server"TextMode="MultiLine" Rows="10"Columns="50"></asp:TextBox>

$(document).ready(function(){
var MaxLength = 250;
$('#txtValue').keypress(function(e)
{
if ($(this).val().length >= MaxLength)
{
e.preventDefault();
}
});});
henryc10 is offline   Reply With Quote
Old 04-19-2013, 03:24 AM   #5
vivekaryan
Registered User
 
Join Date: Apr 2013
Posts: 58
oh thanks.............its working.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
vivekaryan is offline   Reply With Quote
Old 04-30-2013, 12:10 AM   #6
samuelblack
Registered User
 
Join Date: Apr 2013
Posts: 6
character limitation

here you can try by giving rows n colums value.
samuelblack is offline   Reply With Quote
Old 01-02-2014, 12:08 AM   #7
Die_heart
Registered User
 
Join Date: Nov 2013
Location: Surat
Posts: 971
Asp.net asp.net
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
Die_heart is offline   Reply With Quote
Old 03-11-2014, 11:45 PM   #8
alligatortek001
Registered User
 
Join Date: Nov 2013
Posts: 92
ya its possible..
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
alligatortek001 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:55 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.