I have an ASP.NET MVC application I’m building and I’m using a Master page. On this master page, I would like to further break things up by creating a separate file for “Tabs”, “Header”, and “Footer”.
What kind of view should I create to encapsulate these things to help remove clutter from my Master Page? Also, how do I reference these in the correct place in my master view so I can have them rendered properly?
There are several different types of options available for creating views/content views/user controls, etc for MVC and I need to know which is the right one for this task and how to use it.
If you are using WebForms Views then you have 3 options:
Partial Views / User Controls:
Using Html.RenderPartial (I think it is the best method for creating Tabs in ASP.NET MVC 1.0 for today). Your markup will be looking as:
Nested MasterPages:
<asp:Content ContentPlaceHolderID="Content" >HtmlHelper extensions:
You can use (I think it is wrong way for creating Tabs) something like this: