是否可以像在 ASP.NET 网站项目中那样在 ASP.NET Web 应用程序项目中创建嵌套母版页?
Is it possible to create nested master pages in an ASP.NET Web Application projects as one can do in ASP.NET Website projects?
我正在使用 Visual Studio 2008 并开发 ASP.NET Web 应用程序.在创建母版页时,无法选择另一个母版页,如果可用,我可以创建嵌套的母版页.
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.
是的,从 .NET 框架的第 2 版开始,已经支持嵌套母版页.一个警告是,如果您有嵌套的母版页,您将不会在 Visual Studio 2005 中获得设计时支持.这在 VS 2008 中不是问题.
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"** %>
这篇关于在 ASP.NET Web 应用程序中创建嵌套母版页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!