asp.net mvc - RenderPartial Views with CheckBoxes. -
for each each item available render partial view, in partial view have checkbox. purpose the user can select multiple items @ once, when hit delete items selected deleted. checkbox in partial view not within form like:
<%= html.checkbox("isselected", model.isselected)%>
so displays correctly, nothing.
i asked question binding value model checkbox , worked fine. did:
<%= html.checkbox("["+itemx+"].isselected", x.isselected) %>
but have create partial view wondering how tie , values partial view?
thanks.
@felipe: answer not wrong, small performance improvement not call html.partial in loop.
instead, call html.partial ones , pass in ienumerable model , loop through items in partial view.
more info on topic: http://channel9.msdn.com/series/mvcconf/mvcconf-2-steven-smith-improving-aspnet-mvc-application-performance
Comments
Post a Comment