how to add default value to the textbox helper through viewdata in asp.net mvc?

Posted by Renu on Stack Overflow See other posts from Stack Overflow or by Renu
Published on 2010-05-14T12:42:00Z Indexed on 2010/05/14 12:44 UTC
Read the original article Hit count: 181

Filed under:

i want to add default value to the html text box by the view data. the foolwing code will give an idea wht i want to do exactly

<%= Html.TextBox("quantity", <%= Html.Encode(ViewData["quantity"]) %>, new { maxlength = 4 })%>

but it shows an error. plz tel me the solution for this. thank in advance....

© Stack Overflow or respective owner

Related posts about asp.net-mvc