473,657 Members | 2,537 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Limit to 150 characters in multi-line textbox

Can you limit the number of characters in a multi-line textbox? My tests in
indicate that the MaxLength property causes client side limits only on
single line textboxes.

Thanks in advance!

Mark
Nov 17 '05 #1
4 4367
If this doesn't work on multiline textboxes, you will have to write
javascript to handle the onkeydown event or something like that, to prevent
the user from entering more then 150 characters.

"Mark" <fi************ **@umn.edu> wrote in message
news:uS******** *****@TK2MSFTNG P10.phx.gbl...
Can you limit the number of characters in a multi-line textbox? My tests in indicate that the MaxLength property causes client side limits only on
single line textboxes.

Thanks in advance!

Mark

Nov 17 '05 #2
| Can you limit the number of characters in a multi-line textbox? My tests
in
| indicate that the MaxLength property causes client side limits only on
| single line textboxes.

You cannot. Recommended way is to use validator.

--
Michal A. Valasek, Altair Communications, http://www.altaircom.net
Please do not reply to this e-mail, for contact see http://www.rider.cz
Nov 17 '05 #3
Mark,

It is documented that MaxLength only works while a text box is in single
line mode.

However, you may use a regular expression validator to control the length
of the text box. I have sample code for this on my web site:
www.aboutfortunate.com. Just go to the code library and search for: "text
area length validation".

I hope this helps.

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Mark" <fi************ **@umn.edu> wrote in message
news:uS******** *****@TK2MSFTNG P10.phx.gbl...
Can you limit the number of characters in a multi-line textbox? My tests in indicate that the MaxLength property causes client side limits only on
single line textboxes.

Thanks in advance!

Mark

Nov 17 '05 #4
Take a look @ Recent tips and tricks Validating MaxLength of the TextArea using CustomValidator Topic:http://www.aspnet101.com/aspnet101/tips.aspx

"Mark" <fi************ **@umn.edu> wrote in message news:uS******** *****@TK2MSFTNG P10.phx.gbl...
Can you limit the number of characters in a multi-line textbox? My tests in
indicate that the MaxLength property causes client side limits only on
single line textboxes.

Thanks in advance!

Mark



Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
47811
by: Pikkel | last post by:
i'm looking for a way to replace special characters with characters without accents, cedilles, etc.
3
5333
by: CajunCoiler \(http://www.cajuncoiler.tk\) | last post by:
I've seen no reference to this in the MSDN library, so I ask here... what is the known upper limit for the RichTextbox control? And when this limit is exceeded, what error is generated?
5
12132
by: Jesper Rønn-Jensen | last post by:
I have a textarea that must be limited to 70 characters. No big deal -- at least so I thought. * Textarea must not exceed 70 characters * Exceeding content must be cut off * Must work on input by keyboard (keypress, keyup events) * Must work on pasted input from context menu * Must work on pasted input via CTRL+V and similar * Must work on pasted input via browsers menu>Edit>Paste * Must work in Mozilla + IE and coded via W3C standards
2
12416
by: SJM | last post by:
In some VBA code I am building an SQL string to append a new record to a table. The string involves 40 fields. What I am finding is that it works with 39 fields but when I add 40 it fails with the error 3134 (syntax error). I am 99% sure there is no syntax error, rather I suspect that it could be due to limit on string length or number of fields. I have not been able to find anything that defines this though.
5
2652
by: Mitchell Thomas | last post by:
I am using Oracle as a backend and have a field set as Varchar2(2000). The problem i have is access interprets this as a memo field and allows the user to type more than 2000 characters but does not store the excess characters beyond 2000, giving the user the false sense of security that what they are typing beyond 2000 characters is being saved, which is not the case. I want to prevent the user from typing more than 2000. How do i do...
3
2885
by: ken | last post by:
Hi, I was wondering how the 4k table record limit is counted. I have access 2k. I text fields are 256 chars. Memo fields are not included in the calculation. What about yes/no fields would that be just 1 char? also integers they are probably not included either? I just need to make sure none of my tables exceeds the limit. Thanks
1
2355
by: HopfZ | last post by:
Internet Explorer 6 bookmarklets(favlets) has size limit. And its size limit depend on the kind of code. For example, CODE A and CODE B (below) are both at their size limit. CODE A does not work (as a bookmarklet), but if you replace the number 44444 at the end to 4444, then it works. CODE B is much longer than CODE A, but if you replace OO in the regular expression to O, then it works. I don't know why they have different size limits....
4
2943
by: Derty | last post by:
Any way to limit the length of databound text on a datalist itemtemplate?
198
5238
by: Antoninus Twink | last post by:
Or, just how low has this group sunk? Twice in the past couple of days, Default Loser has accused Chris Hills, member of the ISO C committee, of being a troll (though given that the former's only "contributions" to this group are "don't top post" and "plonk" posts, perhaps his opinions shouldn't be given *too* much weight...) But Jack Klein, too, has said the same thing in ever-so-slightly more guarded language. And Heathfield has...
2
1167
by: =?Utf-8?B?Q2hyaXMgRGF2b2xp?= | last post by:
I thought there was a limit of characters passed on the URL in asp.net of 1100 characters. I sent 1426 characters and it worked. Is there a limit of number of characters on the URL that you can send on a redirect to another page? What is that limit? -- Chris Davoli
0
8385
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8821
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8723
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8602
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7316
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.