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

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -