I’m trying to print a simple HTML tree structure, consisting of ul and li elements. I want to be able to pass the view an IEnumerable<T> where T has some hiearchy information (e.g. parent). Now I want the view to output the Tree control much like ASP.NET’s Tree used to work. Is there any way to do this in MVC3 using Razor?
I’m trying to print a simple HTML tree structure, consisting of ul and li
Share
I’ve so far ended up doing it like this:
The reason being, this is still in the Razor View. And I can keep my presentation logic in my view. It’s not exactly what I’d hoped, but I thought I’d share it with you guys here anyway.