Creating nested master pages in ASP.NET Web Application(在 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 应用程序中创建嵌套母版页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 ASP.NET Web 应用程序中创建嵌套母版页
基础教程推荐
- 从 C# 控制相机设备 2022-01-01
- 如果条件可以为空 2022-01-01
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- C# 9 新特性——record的相关总结 2023-04-03
- 获取C#保存对话框的文件路径 2022-01-01
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- 将数据集转换为列表 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
