title: ASP.Net Multiline Textbox Maxlength
body: <p>I've bee searching for a way to limit the text within a TextBox wich looks like this</p>
  
  <pre><code>&lt;asp:TextBox runat="server" ID="tbTest" TextMode="MultiLine"  
               MaxLength="20" Rows="5" Columns="30" &gt;
  &lt;/asp:TextBox&gt;
  </code></pre>
  
  <p>The property  <code>MaxLength="20"</code> only works if the other property <code>TextMode="MultiLine"</code> is <strong>not</strong> set. It isn't even rendered.</p>
  
  <p>The output in the HTML looks like this:</p>
  
  <pre><code>&lt;textarea name="ctl00$ContentPlaceHolder1$tbTest" 
            id="ctl00_ContentPlaceHolder1_tbTest" rows="5" cols="30"&gt;
  &lt;/textarea&gt;
  </code></pre>
  
  <p>If you search here on SO fo a solution to solve this issue, you get 2 ways suggested:</p>
  
  <ul>
  <li>add a (<code>asp:RegularExpression</code>) validator and validate the control</li>
  <li>add a JavaScript which removes the last insert character in case the limit is reached.</li>
  </ul>
  
  <p><strong>BUT</strong></p>
  
  <p>Most of the answer are prevois 2013 and the support of <code>maxlength</code> over all browsers was from 2013 as IE10 was released (<a href="https://www.w3schools.com/tags/att_textarea_maxlength.asp" rel="noreferrer">reference</a>).</p>
  
  <p>Currently every Browser supports this attribute - test it on your own: <a href="https://jsfiddle.net/wuu5wne1/" rel="noreferrer">https://jsfiddle.net/wuu5wne1/</a></p>
  
  <p><strong>QUESTION</strong></p>
  
  <p>How can I force ASP.Net to apply this attribute to my multiline textbox?</p>