Multiple Levels of Master Pages

本文介绍如何在ASP.NET中实现多级母版页的配置方法。通过详细示例展示了不同层级页面之间的嵌套关系及其实现过程。包括企业级(Corporate)、部门级(Research)及具体内容页面(Publication)的设计思路。

   This feature provides a way to display standard content from several levels of hierarchy. For
example, a Content page named Publication.aspxcan establish its Master as Research.master,
which can in turn declare its Master as Corporate.master. The final rendering will be of Research
.aspxsurrounded by Research.master, and all of that surrounded by Corporate.master. One prob-
lem is that the space remaining for content is reduced at each level. VWD does not contain automatic
tools to create multiple levels of Masters. In fact, if you have multiple levels, you can only open those
pages in Source View.
 

    To create pages with multiple levels of Masters you must include in the middle-level page tags that both
indicate its Master page (up a level) and its content placeholders (for the lower level). Recall that a
Master page must have <%@Master...%>on the first line, and that a lower-level or Content page must
have <%@PageMasterPageFile=%>on its first line. In the case of a middle page that is both a Content
and Master page, the tag must start with <%@Master...and also contain ...MasterPageFile=%>.
Also recall that a Master page contains an <asp:ContentPlaceHolder>tag whereas the Content page
has an <asp:content>tag. In the case of a middle layer, there must be an <asp:content>holding the
ID of the Master’s <ContentPlaceHolder>tag. Then within that tag there is an <asp:
ContentPlaceHolder>tag that will be used by the next level down.
The following example illustrates a Corporate Master page, then a Research department Master page,
and finally a Publication.aspxpage that holds the content. The Corporate page is shown in the fol-
lowing code. Note that its content placeholder is defined in the shaded lines:

<% @ Master Language = ”C#”  %>
<! DOCTYPE html PUBLIC “ - // W3C // DTD XHTML 1.1 // EN”
“http: // www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”>
< html xmlns = ”http: // www.w3.org/1999/xhtml” >
< head runat = ”server” >
< title > CorporateMaster </ title >
</ head >
< body >
Corporation Name
< form id = ”form1” runat = ”server” >
< div >
< asp:contentplaceholder 
id
= ”ContentPlaceHolderCorporate” 
runat
= ”server” >
</ asp:contentplaceholder >
</ div >
</ form >
</ body >
</ html >

   The Research department Master page is illustrated by the following code. This page is the most com-
plex, because it is a Content page for the Corporate page, and a Master page for the Publication page.
Notice the use of Masterand MasterPageFile=on the first line that establishes this as content for the
Corporate Master page. Then observe that the <asp:ContentPlaceHolder>will house other pages as
content (in this case the Publication page). The content placeholder must sit wholly within the

< asp:content > tags:
<% @ Master MasterPageFile = ~/ Corporate.master”  Language = ”C#”  %>
< asp:Content runat = ”server” 
ContentPlaceHolderID
= ”ContentPlaceHolderCorporate” >
Research Department
< asp:contentplaceholder 
id
= ”ContentPlaceHolderResearch” 
runat
= ”server” >
</ asp:contentplaceholder >
</ asp:Content >

    Code for the Publication.aspxpage (designed with content only) is shown in the following code.
Here you only need to designate a Master page. This page, which sits at the lowest level, is not a Master
page:

<% @ Page Language = ”C#” MasterPageFile = ~/ Research.master” Title = ”Untitled Page”  %>
< asp:Content ID = ”Content1” 
ContentPlaceHolderID
= ”ContentPlaceHolderResearch” 
Runat
= ”Server” >
Publication text 
</ asp:Content >


3. Design 3.1. Component Classification Most networking product components and their sensitivity types should be listed here under the "Networking Product" sheet. Component names may differ from one product to another. Match them as best as possible. TPS Networking Products Sensitivity Classification Component, library, and package sensitivity levels need to be classified as High, Medium, or Low. Each component is scored with a sensitivity matrix containing 7 criteria, assigned a level (0 to 2) per criteria, then summed for the total points. The total points determine the component’s sensitivity level of High, Medium, or Low. 7 criteria to determine sensitivity levels include: User Data and Secrets * System Privilege Management * Attack Surface * System Stability Cloud Proprietary Security * * Components are automatically classified as High sensitivity if they categorize in any of the following critical criteria: User Data and Secrets, System Privilege Management, Attack Surface, or Security. Source: TP-Link Component Sensitivity Scoring Framework.pdf TPS Home Networking and Enterprise Networking teams have reorganized repositories in backhand index pointing right SCR LZ Organization.xlsx backhand index pointing left 3.2. Understand Product's Current Repository and Code Structure In iplatform Deco BE65 v3.0, 4 repositories are combined for the full product code base as of 2025年10月6日 (repository: branch): prplink Platform prplos: develop_prplink_epoch_20250818 Qualcomm Vendor SDK (QCA SDK 12.2) Deco/SDK/QCA/qca_95xx_12_2: master.stable.dvp.prpl Qualcomm WiFi Driver (QCA WiFi) wifi-driver/qca/qca-wifi-12.x: 12.2_cs TP-Link Generic WiFi Driver Config Script wifi-driver/wifix: master These repositories contain standalone components and corresponding Makefile structures for feeds/ and src/ modules. Therefore, when reorganizing the repositories, we must maintain the existing code architecture via the Google repo tool's manifest.xml with the existing component destination path. 3.3. Prepare Completely New Repositories and Branches Keep the repository and branch name scheme consistent across all TP-Link products. The following repository structure is based on prplink projects (expansion on OpenWRT). Different teams' projects may have different software architecture; however, the main goal is to quarantine Kernel and high sensitivity modules individually in their own repositories and configure the top-level product manifest.xml point to all relative project repositories and branches. 3.3.1. exclamation markexclamation markexclamation markREQUIRED - Repository Descriptionsexclamation markexclamation markexclamation mark These descriptions increase transparency and traceability from code to software. 3.3.1.1. REQUIRED: Gerrit Description All Gerrit Repos update their repo description sections to have the following information (follow specific format required for automated checks) Business Unit - HN, CE, ES, EN, SP, COMMON SERVICE, IT POC/Team Name - A project lead or primary coder Related Products - What products is this code involved in? Tapo, Festa, etc. If the branch is only used for Permissions, put Permissions as the Product Example: {High-level description | Other information} #BU {Business Unit Acronym} #POC {Name and email of person or team} #Products {CSV list of products} 3.3.1.2. REQUIRED: Repository Content Repositories must have a README with the following information Business Unit POC Team Products High-level overview Requirements/Dependencies Build process Link to additional documentation Link to Changelog/release information All repos must have the latest, stable code in a single main/master branch Projects with multiple code sets should be separated into their own repositories 3.3.1.3. REQUIRED: Security Champion's FiniteState JAR File Security Champions please refer to: 01 - How To: Jenkins SAST SCA Integration to obtain finitestate.jar to push and merge to the top-level of every repository. (Questions and access contact Jevin Evans Kajol Patil ). The JAR file is generated from FiniteState account of the Security Champion and used for binary scanning in Jenkins (in CI/CD + SAST + SCA). Authorized TPS U.S. Security Engineers and Project Leaders will be appointed as Security Champions for LZ projects and these appointed Security Champions will be responsible for pushing their JAR file for SCA scan to every repository. 3.3.2. Repository - Product - Manifest prplink projects with product branches containing manifest.xml pointing to component repos/branches Repository Branch prplink_projects Deco/be65pro_v1_SECURE Deco/be65pro_v1 The product's/project's non-secure branch contains manifest.xml pointing to ongoing development branches of each sub-repository for core modules (high vulnerability), base modules, vendor SDK modules, and platform required directories and files. The product's/project's secure branch contains manifest.xml pointing to secure master branches of each sub-repository for all modules. Secure master branches are automatically maintained by CI/CD post security scans. Propagation Example: Aginet/xgb834v Repository Branch manifests/HNE Deco/BE65_v3.0_SECURE Deco/BE65_v3.0 3.3.3. Create New Repositories Reference collaborative document for New Repository names and structure: SCR LZ Organization.xlsx Naming guideline: # <Project Family>/<Sensitivity Classification>/<Development Source>/<Module/Package Dependent> # core = High sensitivity # base = Medium/Low sensitivity # public = opensource # private = TPS proprietary # vendor = SDK or vendor distributed # Examples: # QCA SDK 12.5 Deco/core/vendor/qca/12.5/linux-5.4.213 Deco/base/vendor/qca/12.5/sdk Deco/base/vendor/qca/12.5/qca-wifi Deco/core/vendor/qca/12.5/qca-hostap # iplatform High Sensitivity Modules Deco/core/public/accel-pptpd Deco/core/public/bridge-utils Deco/core/public/busybox Deco/core/public/conntrack-tools Deco/core/public/dropbear Deco/core/private/extctl Deco/core/public/firewall Deco/core/public/improxy Deco/core/public/libssh Deco/core/public/luci Deco/core/private/luci-apps Deco/core/public/resolveip Deco/core/public/rp-pppoe Deco/core/private/tdb Deco/core/private/tipc-server Deco/core/public/uhttpd Deco/core/public/arptables Deco/core/public/curl Deco/core/public/libwebsockets # Common iplatform Deco/base/iplatform Deco/base/vendor/Bluetooth/AC63 Deco/base/private/package/tddp Deco/base/private/package/webpages # Common General base/private/wifix Reference and use the 2 bash scripts below to help generate new repositories. create_repo_desc.sh repo_desc.txt The create_repo_desc.sh uses SSH Gerrit access to create new projects with master branch and populate description. Modify Gerrit Server IP Address, credentials, repo_desc.txt repository names and descriptions create_branches.sh repo_branches.txt The create_branches.sh creates develop branches per new repository with desired name. All development will be done in develop. Master is reserved for post QA/Security Scanning for release. Develop branches will not merge to master without proper verification and authorization.
最新发布
12-20
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值