Make Html.TextBoxFor Look Like a Shortcut

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; } 
+7
source share
1 answer

Make the border the same color as your background.

+10
source

All Articles