在不使用样式的情况下隐藏mvc4中的复选框

时间:2013-05-19 12:54:51

标签: asp.net-mvc asp.net-mvc-3 asp.net-mvc-4

我想在不使用mvc3中的样式的情况下将复选框的可见性设置为false。

@Html.CheckBoxFor(model => Model.Eng, new { @id = "chkEnergy1", @value = "true", @class = "chkEnergy",@visible=false }).I have given like this but its not working

1 个答案:

答案 0 :(得分:1)

@Html.CheckBoxFor(model => Model.Eng, new { @id = "chkEnergy1", @value = "true", @class = "chkEnergy",@style = "display:none;" }).