title: limiting the no. of characters entered in textbox html helper element in asp.net mvc 2.0
body: <p>I am using a order form as follows,                                                          &lt;%using (Ajax.BeginForm("AddToCart", "../ShoppingCart", null, new AjaxOptions { OnSuccess = "handleUpdate", OnBegin = "ajaxValidate" }, new { @class = "AddToCartForm" }))
    { %> 
  <li> 
        &lt;%=Html.Label("Quantity")%>
        &lt;%=Html.TextBoxFor(model => Model.Count)%> </p>
  
  <p></li>
      &lt;% } %> 
  Now if i entered a large no of t-shirts like 999999999999999999999999999999999999 the Form was unresponsive.So i should limit the no of characters entered in the textbox.So please tell me how to set this limitation so as to not having integer overflow.</p>
  
  <p>Thanks in advance,</p>
  
  <p>And i also restrict they cannot order more than 2*10^31-1  or 32-bit signed integers can hold.            </p>