开发者

Make a Html.TextBoxFor look like a Label

I would like to make the textbox in MVC 3 display like a label. The code i have still shows the border.

<p>@Html.TextBoxFor(m => m.PostcardsperWeek, new Dictionary<string, object>() { 
   { "id", "txtPostcardPerWeek" }, 
   { "readonly", "true" }, 
   {"class", "TextBoxAsLabel"} })
</p>

css:

.TextBoxAsLabel
{
   borde开发者_如何学Cr: none;
   background-color: #fff;
   background: transparent;
}


Make the border the same color as your background.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜