Can you have several levels of master views in ASP.NET MVC?

Possible duplicates:
Are there any nested master pages in ASP.NET MVC?
Creating Nested Master Pages in an ASP.NET Web Application

Duplicate

Are there any nested master pages in ASP.NET MVC?

Do you have a main view in ASP.NET MVC that inherits from another main view?

My reasoning is this: I have several pages that just need to be inherited from the main base view containing my header, footer and nothing else.

However, I also have a large number of pages that not only need this, but also need border images and a container surrounding the content. Can I get a secondary master view that inherits from the first primary main view?

Thus, I could:

The main main view - Contains a header, the footer is nothing more. The
second main view - inherits the main view of the wizard, and also has its own content (some pages are needed).
Some views simply inherit the basic main view, for example, our landing page.
Some view is inherited from the secondary, which also Must contain a Basic Master view.

Is it possible to have multiple levels of inheritance with masterviews?

+3
1

MasterPages MasterPages. MSDN "" . , Pages - <%@ Master %>, MasterPageFile, , <asp:Content ... >.

MasterPage, , , , , . :

<%@ Master MasterPageFile="~/TopMaster.master" %>
<asp:Content runat="server" ContentPlaceholderID="LeftColumn">
    Content in the middle-level master
    <asp:ContentPlaceholder runat="server" Id="LeftColumnSubContent" />
</asp:Content>
+2

Source: https://habr.com/ru/post/1712507/


All Articles