How do you create a databound checkbox list using linq-sql and asp.net mvc
thanks
How do you create a databound checkbox list using linq-sql and asp.net mvc
thanks
Hey,
Simply setup a view like the following:
<% foreach (var item in Model) { %>
<%= Html.CheckBox("check" + item.Key.ToString(), item.Selected) %>
<% } %>
Model contains an enumerable list of some LINQ object you have in your model. If there any other requirements?
Thanks.