I'm just learning ASP.NET MVC and my first project is to create a simple link directory (like DMOZ).
I can easily build a strongly typed view of a list of subcategories for a category.
I can easily build a strongly typed view of a list of all the sites in a particular category.
Now, here's what I'm having trouble wrapping my head around:
If I'm viewing a particular category, how would I, in the same page view, display two models (sets) of data:
- Top of the page: All subcategories for the category being viewed.
- Bottom of the page: All sites in the category being viewed.
I don't have the faintest idea of how to return both the subcategory list and the site list to a particular view. Is it possible? Is there a clean way to do it? (Feel free to point me to an online tutorial or book chapter).