Can I use Html.CheckBoxFor in a loop? If so how?
Here is an example of what I am trying to do. (This is using spark, but the question still applies to razor or aspx)
<ul class="voteOptions">
<for each="var answer in poll.Answers">
<li>!{Html.LabelFor(a =>a.Answer)}</li>
<li>!{Html.CheckBoxFor(a =>a.Key)}</li>
</for>
</ul>
This obviously doesn't work because a represents the viewmodel not the current item in the loop.