ASP.NET MVC Multiple Layout -


I have a website that has 2 types of layouts.

  1. No columns
  2. with 2 columns

are similar to both headers, footers and many other parts, but Inside the main content, there are 2 different layouts and I want to choose between 2 site owners. How would I go about fulfilling it?

I was thinking about building a main site master and with that there is one near the heir of 2 columns. If this is the right method, then what are the keywords for Google, or you are free to explain the Inheriting Site Masters here.

Thank you,

The master page, like any other page, Can be inside. Specify master's masterpage file directions in general:

  & lt;% @ master language = "c #" masterpagefile = "~ / view / share / app.master" inherits = "system .Web.Mvc .ViewMasterPage "%>  

Your ideas can be used as a master page or nested one as your master.

Alternatively, you can dynamically set the master page of your thoughts in many ways. To specify the main page, refer regularly () method is overloaded:

return view ("some pages", "masterpage file history");

Or even better, you have to specify an action method to do it globally. You can see.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -