Display a value in a disabled textbox using TextBoxFor

Posted by hungster on Stack Overflow See other posts from Stack Overflow or by hungster
Published on 2010-04-23T23:38:05Z Indexed on 2010/04/23 23:43 UTC
Read the original article Hit count: 409

Filed under:

I'm trying to display a disabled textbox with the value 'FL' in it. Somehow the textbox does not have any value when it is displayed, but it is disabled. How do you display a value in a disabled textbox?

<%= Html.TextBoxFor(model => model.State, new { value="FL", disabled="disabled" }) %>

© Stack Overflow or respective owner

Related posts about asp.net-mvc-2