[英]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.