HTML Helper in asp.net MVC
Can someone pls tell me what i'm doing wrong? I want to make a checkbox
using the HTML helper.
<ul>
<li>@Html.CheckBox("chk1", true, "checkbox1")</li>
<li>@Html.CheckBox("chk2", true, "checkbox2")</li>
<li>@Html.CheckBox("chk3", true, "checkbox3")</li>
<li>@Html.CheckBox("chk4", true, "checkbox4")</li>
<li>@Html.CheckBox("chk5", true, "checkbox5")</li>
<li>@Html.CheckBox("chk6", true, "checkbox6")</li>
<li>@Html.CheckBox("chk7", true, "checkbox7")</li>
</ul>
When i run the view, i see the checkbox all checked which is what i want.
However it doesnt display the labels Checkbox1, checkbox2, etc.
No comments:
Post a Comment