问题描述
我没有母版的经验。但在采访中我遇到了这样的问题
In一个网络应用程序我有3个主页,我怎么能确定哪一个是第一个主页
提前感谢。
Hi,
I don't have experience with master pages.But in Interview i faced a question like this
"In a web application i have 3 masterpages, how can i identify which one is the first masterpage"
thanks in advance.
推荐答案
在Web应用程序中我有3个主页,我如何识别哪个是第一个主页
"In a web application i have 3 masterpages, how can i identify which one is the first masterpage"
分析 aspx
页面并查看包含哪个母版页。
然后转到该母版页并查看是否包含任何其他母版页。继续这一点,你没有找到任何母版页。
最后一个是第一个母版页。
这个概念是 - []
Analyze the aspx
page and see which Master Page is included.
Then go to that Master Page and see if any other Master Page is included or not. Continue this upto the point, where you don't find any Master Page included.
That last one is the first Master Page.
This concept is - [MSDN] Nested ASP.NET Master Pages[^]
<![CDATA[<%@ Page Language="C#" MasterPageFile="~/Master1.master" %>]]>
每个继承母版页的内容页面都有以上行。多个内容页面可以有单个母版页。
因此,请检查您要识别母版页的内容页面。
Every content page inheriting a masterpage will have above line. Multiple content pages can have single master page.
So, check your content page for which you want to identify the masterpage.
这篇关于在Web应用程序中,我有3个三页,如何识别哪个是第一个母版页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!