title: How to enable only digits to enter into the Texbox on ASP.NET MVC Page?
body: <p>I have an ASP.NET MVC Page along with Zipcode, Phonenumber &amp; Fax.</p>
  
  <p>Now i want to disable all other keys and only enable digits from the keyboard while typing on these textboxes.</p>
  
  <p>Appreciate your responses.</p>
  
  <p>As of now this is how the form is validated using Validation Plugin.</p>
  
  <p></p>
  
  <p>Zip<em>*</em></p>
  
  <pre><code>    &lt;td CssClass="Form_Value"&gt;&lt;%= Html.TextBox("ZipCode", Model.AddressDetail.FirstOrDefault().ZipCode, new { @class = "required zip", minlength = "5"})%&gt;&lt;/td&gt;&lt;/tr&gt;
  </code></pre>
  
  <p>$("#frmCustDetails").validate({</p>
  
  <pre><code>        rules: {
              ZipCode: {
                  required: true, digits: true, minlength: 5, maxlength: 9 
           },
          messages: {
              ZipCode: {
                  required: "please enter zipcode", digits: "please enter only digits", minlength: "Min is 5", maxlength: "Max is 9
         }
      });
  </code></pre>