c# - How to set a default value with Html.TextBoxFor? -
Simple question, if you use HTML Helper from ASP.NET Framework 1, then it's easy to set a default value The text box is because there is a surcharge Html.TextBox (string name, object value)
. When I tried to use the Html.TextBoxFor method, my first guess was that it should not work:
<%: HTML .TextBoxFor (x = & gt; x.Age, new {value = "0"})%>
Should I stay with HTML.TextBox (string, object) for now?
You can try it
Comments
Post a Comment