Check Max Length

M

Mike Moore

Is there a asp.net validator control that validates the length of the text
being entered or does everyone just write jscript for this?
 
S

Scott Mitchell [MVP]

Mike said:
Is there a asp.net validator control that validates the length of the text
being entered or does everyone just write jscript for this?

There's not one out of the box, but you could create your own, either as
an independent, compiled, custom server control, or by using a
CustomValidator [http://aspnet.4guysfromrolla.com/articles/073102-1.aspx].

--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com

* When you think ASP.NET, think 4GuysFromRolla.com!
 
S

Scott Mitchell [MVP]

Mike said:
Is there a asp.net validator control that validates the length of the text
being entered or does everyone just write jscript for this?

FYI, I created such a control you can use, see:
http://aspnet.4guysfromrolla.com/articles/112404-1.aspx

Also, you could use a RegularExpressionValidator, as Peter Blum
discusses in this post - http://tinyurl.com/7xyht

hth

--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com

* When you think ASP.NET, think 4GuysFromRolla.com!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top