@Html.CheckboxFor(m -> m.List[0].Value) // Value is bool property
generates something like this:
<input id="List_0__Value" name="List[0].Value" type="checkbox" value="false" />
How can i get the generated id of m.List[0].Value property, in order to assign it to “for” attribute?
<label for="List_0__Value">My Text</label>
try:
that will generate a “for” attribute for “label”