@Html.TextBoxFor(m => m.userCode, new { @readonly="readonly" })
You are welcome to make an HTML Helper for this, but this is simply just an HTML attribute like any other. Would you make an HTML Helper for a text box that has other attributes?
~ Answered on 2012-01-06 17:15:18