简体   繁体   English

直到我们可以将内容页面附加到母版页面的级别

[英]Till what level we can attach content page to a master page

I wanted to know that till what level we can attach content page to a master page. 我想知道,直到可以将内容页面附加到母版页面上为止。 I have tried to add 7th but not succeed. 我尝试添加第七,但未成功。

By Google this, I got the answer. 通过Google,我得到了答案。

You can attach content pages to a master page at three levels 您可以在三个级别上将内容页面附加到母版页

At the page level You can use a page directive in each content page to bind it to a master page, as in the following code example. 在页面级别,可以在每个内容页面中使用page指令将其绑定到母版页,如以下代码示例所示。

At the application level By making a setting in the pages element of the application's configuration file (Web.config), you can specify that all ASP.NET pages (.aspx files) in the application automatically bind to a master page. 在应用程序级别,通过在应用程序的配置文件(Web.config)的pages元素中进行设置,可以指定应用程序中的所有ASP.NET页面(.aspx文件)自动绑定到母版页。 The element might look like the following. 该元素可能如下所示。

At the folder level This strategy is like binding at the application level, except that you make the setting in a Web.config file in one folder only. 在文件夹级别此策略类似于在应用程序级别进行绑定,只不过您仅在一个文件夹中的Web.config文件中进行设置。 The master-page bindings then apply to the ASP.NET pages in that folder. 然后,母版页绑定将应用于该文件夹中的ASP.NET页。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我们可以从母版页访问内容页面控件吗? - Can we access content page control from master page? 我们可以通过登录按钮从登录页面(非内容页面)重定向到母版页吗? - Can we redirect from login page(non content page) to master page via login button? 内容控件必须是内容页面中的顶级控件或引用母版页的嵌套母版页 - Content controls have to be top-level controls in a content page or a nested master page that references a master page 母版页怪异 - “内容控件必须是内容页或引用母版页的嵌套母版页中的顶级控件。” - Master Page Weirdness - “Content controls have to be top-level controls in a content page or a nested master page that references a master page.” 我们可以避免在母版页中加载的CSS文件很少加载到内容页面中吗? - Can we avoid few of the CSS files which are there in master page to load in the content pages? 我们可以在页面生命周期中的什么时候分配母版页? - When in the page lifecycle we can assign master page? 就OOP而言,内容页面和母版页面之间有什么关系? - What is the relation between a content page and master page in terms of OOP? asp错误:内容控件必须是内容页或引用母版页的嵌套母版页中的顶级控件 - asp error: Content controls have to be top-level controls in a content page or a nested master page that references a master page 具有母版页和内容页的viewstate - viewstate with master and content page 主页面和内容页面中的ScriptManager - ScriptManager in Master page and Content page
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM