Reputation: 11745
How do I make a textbox read only in mvc? I have included the following snippet, but it`s not working.
<%=Html.Textbox("test", "test", new { style="border: 0px; width:280px" ;readonly=true}%>
Upvotes: 1
Views: 2741
Reputation: 57907
<%=Html.Textbox("test", "test", new { style="border: 0px; width:280px", @readonly = "readonly"}%>
Upvotes: 3