2010-04-12 10 views
1

Comment créer une zone de texte en mvc? J'ai inclus l'extrait suivant, mais cela ne fonctionne pas.en lecture seule dans asp.net mvc

<%=Html.Textbox("test", "test", new { style="border: 0px; width:280px" ;readonly=true}%> 
+0

double possible de http://stackoverflow.com/questions/177673/html-textbox-conditional-attribute-with-asp-net-mvc-preview-5 –

Répondre

3
<%=Html.Textbox("test", "test", new { style="border: 0px; width:280px", @readonly = "readonly"}%> 
+0

Dangit, oublié le mot-clé. .. – Will