Creating nested master pages in ASP.NET Web Application

南楼画角 提交于 2019-12-02 03:12:39

问题


Is it possible to create nested master pages in an ASP.NET Web Application projects as one can do in ASP.NET Website projects?

I am using Visual Studio 2008 and working on an ASP.NET Web Application. While creating a master page there is no option to choose another master page which if was available would have allowed me to create nested master pages.

Have anyone faced similar issue? Is any sort of work around recommended?

Thanks in advance for any help. Cheers.


回答1:


Yes, from version 2 of the .NET framework, nested master pages have been supported. One caveat is that you won't get design time support in Visual Studio 2005 if you have nested master pages. This isn't an issue in VS 2008.

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="SecondLevelMaster.master.cs" Inherits="SecondLevelMaster" **MasterPageFile="~/RootMaster.master"** %>


来源:https://stackoverflow.com/questions/442535/creating-nested-master-pages-in-asp-net-web-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!