I want the text box in MVC 3 to display as a label. The code that I still show the border.
<p>@Html.TextBoxFor(m => m.PostcardsperWeek, new Dictionary<string, object>() { { "id", "txtPostcardPerWeek" }, { "readonly", "true" }, {"class", "TextBoxAsLabel"} }) </p>
CSS
.TextBoxAsLabel { border: none; background-color: #fff; background: transparent; }
bladerunner
source share