user2156088
user2156088

Reputation: 2420

Hide a Checkbox in mvc4 without using style

I want to set the visibility of a checkbox to false without using style in mvc3.

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

Upvotes: 1

Views: 450

Answers (1)

Khalid
Khalid

Reputation: 194

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

Upvotes: 1

Related Questions