Best way to implement nested loops in a view in asp.net mvc 2
Posted
by Junior Ewing
on Stack Overflow
See other posts from Stack Overflow
or by Junior Ewing
Published on 2010-06-03T19:49:53Z
Indexed on
2010/06/03
19:54 UTC
Read the original article
Hit count: 210
Hi, Trying to implement some nested loops that are spitting out good old nested html table data. So the question is; What is the best way to loop through lists and nested lists in order to produce easily maintainable code. It can get quite narly quite fast when working with multiple nested tables or lists. Should I make use of a HTML helper, or make something with the ViewModel to simplify this?
A requirement is if there are no children at a node there should be an empty row on that spot with some links for creation and into other parts of the system.
© Stack Overflow or respective owner