11-01-2011, 12:15 AM | #1 |
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. |
02-23-2012, 11:04 PM | #2 |
Registered User
Join Date: Feb 2012
Posts: 98
|
Asp.net asp.net Fibroids Treatment
|
08-16-2012, 04:15 AM | #3 |
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. |
10-30-2012, 07:44 PM | #4 |
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(); } });}); |
04-19-2013, 03:24 AM | #5 |
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. |
04-30-2013, 12:10 AM | #6 |
Registered User
Join Date: Apr 2013
Posts: 6
|
character limitation
here you can try by giving rows n colums value.
|
01-02-2014, 12:08 AM | #7 |
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. , |
03-11-2014, 11:45 PM | #8 |
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. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|