473,803 Members | 3,166 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Another dumb question about text boxes in a Web app...

I have a multiline text box that I only want to allow the user to type 500
characters in. I set the maxlength to 500, but I can type more than 500
characters in it. Is there a way to set the max length programmaticall y?
TIA

Coleen
Jul 21 '05 #1
1 1301
No, there is no way to set the max length
programmaticall y, the documentation says "This property is
only applicable when the TextMode property is set to
TextBoxMode.Sin gleLine or TextBoxMode.Pas sword", see here:

http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/cpref/html/frlrfsystemwebu iwebcontrolstex tboxclassmaxlen
gthtopic.asp

To get around this, you'll have to validate the max length
yourself using client-side scripting or alternatively, you
can validate server-side by using a custom validator.

Hope this helps

-----Original Message-----
I have a multiline text box that I only want to allow the user to type 500characters in. I set the maxlength to 500, but I can type more than 500characters in it. Is there a way to set the max length programmaticall y?TIA

Coleen
.

Jul 21 '05 #2

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

Similar topics

2
2822
by: Renie83 | last post by:
Hi I really am going crazy! I'm using VBScript, ASP, and SQL My page reminds me of a shopping cart but looking at shopping cart examples has not helped! What I have is a page that brings in products ordered by a certain company. Along with those values, I'm creating a text box at the end of each record that a user may or may not enter in an estimated delivery date. If the user does enter in a date I want that row of data submitted to a...
12
8887
by: Forti2ude | last post by:
Hello, I have a simple form... <form> <select name="foo" multiple> <option value="1">one</option> <option value="2">two</option> <option value="3">three</option> </select>
2
15422
by: RC | last post by:
I am getting the following error message. "Write Conflict this record has been changed by another user since you started edting it. If you save the record, you will overwrite the changes...." I have an Access 2002 database running on a single PC, the front and backend have not been separated yet. I have a form where I use a text box to jump from record to record. The form has about 12 bound text boxes on it. The table that is the...
1
1712
by: Dreamerw7 | last post by:
Hi, I know this is probably a dumb question, but here goes: I have 3 tables: REGION REG_ID REGION
14
4732
by: simonmarkjones | last post by:
Hi, I'm having a bit of trouble editing an old database that was created quite a while ago by someone else. There is a form that lets the user select a member of staff and show details about the training they have had. What im trying to add to this is an email button which emails the person selected - i've managed to be able to do grab the email and create a new email message with the coresponding email adress.
1
286
by: Coleen | last post by:
I have a multiline text box that I only want to allow the user to type 500 characters in. I set the maxlength to 500, but I can type more than 500 characters in it. Is there a way to set the max length programmatically? TIA Coleen
1
2409
by: OwlHoot | last post by:
I am using Thomas Fuchs's amazing drag-and-drop JavaScript library available at: http://wiki.script.aculo.us/scriptaculous/show/DragAndDrop to allow the user to select a subset of items listed in one box by dragging them to another and sort them in the latter, and it works a treat. However, I'd now like to add a couple of buttons, "<<" and ">>" between
9
3186
by: davetelling | last post by:
I am not a programmer, I'm an engineer trying to make an interface to a product I'm designing. I have used C# to make a form that interrogates the unit via the serial port and receives the data. I want to be able to draw lines in a picturebox based upon certain data points I have received. I dragged a picturebox from the toolbar onto my form, but after having gone through the help files, looking online and trying a variety of things, I...
0
1585
by: JB | last post by:
On 8 Apr, 10:03, "DSK Chakravarthy" <dskch...@msn.comwrote: Thanks for the reply. So the first part is looking easy enough. As for the next part: Well I have a winform which has a few text boxes and 1 image. The text boxes, well i suppose they are pretty standard. The font and size will always be the same if that would be an issue. The boxes will always be at the same position on the window, and the window always the same size.
1
10295
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
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
9125
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
7604
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
6844
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5501
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
4275
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
3799
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2972
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.