ASP.NET MVC Html.textbox - How to validate numbers only?
Posted
by gmang
on Stack Overflow
See other posts from Stack Overflow
or by gmang
Published on 2010-04-12T18:59:38Z
Indexed on
2010/04/12
19:03 UTC
Read the original article
Hit count: 312
With the HTML helper, how would you enforce number only without submitting? I know it was done with regular expression if you had a textbox in classic ASP.NET
<%=Html.TextBox("txtYearOfWork",String.Empty, new { maxlength = 4, size="5", autocomplete = "off" }) %>
© Stack Overflow or respective owner