Groups | Blog | Home
all groups > asp.net webcontrols > november 2004 >

asp.net webcontrols : Check Max Length


Mike Moore
11/12/2004 7:00:06 AM
Is there a asp.net validator control that validates the length of the text
being entered or does everyone just write jscript for this?
Scott Mitchell [MVP]
11/12/2004 10:24:21 PM
[quoted text, click to view]

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
mitchell@4guysfromrolla.com
http://www.4GuysFromRolla.com

Scott Mitchell [MVP]
11/23/2004 8:39:47 PM
[quoted text, click to view]

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
mitchell@4guysfromrolla.com
http://www.4GuysFromRolla.com

AddThis Social Bookmark Button