在 ASP.NET Web 应用程序中创建嵌套母版页

Creating nested master pages in ASP.NET Web Application(在 ASP.NET Web 应用程序中创建嵌套母版页)
本文介绍了在 ASP.NET Web 应用程序中创建嵌套母版页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

是否可以像在 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 应用程序中创建嵌套母版页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

What is the difference between Funclt;string,stringgt; and delegate?(Funclt;string,stringgt; 有什么区别?和委托?)
What is the difference between lt;%: and lt;%= in ASP.NET MVC?(ASP.NET MVC 中的 lt;%: 和 lt;%= 有什么区别?)
linq query for tag system - search for multiple tags(标签系统的 linq 查询 - 搜索多个标签)
Forum tags. What is the best way to implement them?(论坛标签.实施它们的最佳方法是什么?)
html script tag not using type javascript lt;script type=quot;text/htmlquot;gt;?(html 脚本标签未使用类型 javascript lt;script type=quot;text/htmlgt;gt;?)
ASP.NET Control to HTML tag equivalent(ASP.NET 控件到 HTML 标记等效)