I am using the default asp.net MVC 2 syntax to construct TextBox\'s which are integer or decimal for my asp.net MVC web app:
<%: Html.TextBoxFor(model =&g
What about "" instead of null.
<%: Html.TextBox("Loan.InterestRate", Model.Loan.InterestRate == 0 ? "" : Model.Loan.InterestRate) %>
Also why isnt Loan.InterestRate nullable?
<%: Html.TextBox("Loan.InterestRate", Model.Loan.InterestRate ?? "") %>