Validate 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 🙂

Leave a Comment

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

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...