Validate asp.net multiline TextBox

Because it is rendered to TextArea the MaxLength property does not work. One way around this is to attach a regular expression validator to that control. What is important is to set the ValidationExpression to something like “^[\s\S]{0,255}$“. Where 255 is the maximum length allowed.

Hope this helps icon smile Validate asp.net multiline TextBox

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Read previous post:
What is coming with VS2011 and Framework 4.5

Read here from Scott Hanselman's post. Download Links You likely only need this one download: Visual Studio 11 Developer Preview...

Close