Custom Text Box control
<p>I have a specific need to control how some text is entered in a multiline textbox (ASP:TextBox)</p>

<p>At first I though I could control it with just JavaScript but it appears I can get close but not 100% of what I need.</p>

<p>Now I'm wondering if I need to write a control from scratch (never done that) or if I can inherit from TextBox and be able to get what I need.</p>

<p><strong>Requirements:</strong></p>

<blockquote>
  <ol>
  <li>MultiLine TextBox</li>
  <li>Ability to control row's and columns</li>
  <li>Would prefer to be able to turn off the scroll bar that appears disabled
  on a MultiLine Textbox</li>
  <li>Still be able to use the validators</li>
  <li>Word Wrap</li>
  <li>Maxlength</li>
  <li>If I set the columns to 26 and the rows to 4 the user should not be able
  to enter more then 104 characters
  (Here comes the parts I've not figured
  out)</li>
  <li>The user can not enter more then 4 lines even if the max length is not
  reached.</li>
  </ol>
</blockquote>

<p>The 4 line limit has really been the biggest part of my trouble.</p>

<p>If you enter:</p>

<blockquote>
  <p>a<br>
  b<br>
  c<br>
  d  </p>
</blockquote>

<p>I can check how many <code>\n</code> characters.  However if you enter:</p>

<blockquote>
  <p>12345678901234567890123456<br>
  7890<br>
  c<br>
  d  </p>
</blockquote>

<p>Here they have wrapped so there is one less <code>\n</code> character or you enter:</p>

<blockquote>
  <p>This is a long piece of<br>
  text that has been entered<br>
  c<br>
  d  </p>
</blockquote>

<p>Here the text has wored wrapped and again you can't just count the <code>\n</code> characters.</p>
