Fix: CheckBoxList checked attribute encoding

This commit is contained in:
Gary Sharp
2013-10-28 14:11:31 +11:00
parent 233d62442c
commit 7096a511c3
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -40,7 +40,7 @@
itemNextId++;
var itemId = forceUniqueIds.HasValue ? string.Format("{0}_{1}_{2}", id, item.Value, forceUniqueIds++) : string.Format("{0}_{1}", id, item.Value);
<li>
<input id="@itemId" name="@id" value="@item.Value" type="@inputType" @(item.Selected ? "checked=\"checked\" " : " ")/><label for="@itemId">@item.Text</label></li>
<input id="@itemId" name="@id" value="@item.Value" type="@inputType" @(item.Selected ? new HtmlString("checked=\"checked\" ") : null)/><label for="@itemId">@item.Text</label></li>
}
}
</ul>