Created
March 11, 2010 15:45
-
-
Save BlackFoks/329254 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="editor-label"> | |
<%= Html.LabelFor(model => model.Authors) %> | |
</div> | |
<span id="authorChackboxes"> | |
<% List<Author> authors = ViewData["authors"] as List<Author>; | |
foreach (Author author in authors) | |
{ | |
string checkboxId = string.Format("author{0}", author.Id); %> | |
<input type="checkbox" | |
id="<%= Html.Encode(checkboxId) %>" | |
name="authorIds" | |
value="<%= Html.Encode(author.Id) %>" /> | |
<label for="<%= Html.Encode(checkboxId) %>"><%= Html.Encode(author.Name) %></label> <br /> | |
<% } %> | |
</span> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment