如何在母版页分配给现有的.aspx页面? [英] How to assign a master page to a existing .aspx page?

查看:316
本文介绍了如何在母版页分配给现有的.aspx页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在母版页分配给现有的.aspx页面?

How to assign a master page to a existing .aspx page ?

推荐答案

在分配现有的.aspx页面,母版页一个网页的所有基本要素,现在居住与像头,身,标题等母版页。因此,如果你的页面使用这些元素的目的一样,以网页提供标题,规定在标签JavaScript的......所有这些操作,现在需要在母版页上完成。但是,如果你需要在子分配这些元素各自的值 - 网页级别,那么你需要在母版页的头标记定义内容占位符。另一个内容占位符应置于母版页的正文中。

When assigning an existing .aspx page to a master page all the basic elements of a web-page now resides with the master page like head, body, title etc. Hence if your page is using these elements for purpose like giving title to the webpage, defining javascripts in the tag... all these operations now need to be done on the master page. But if you need to assign these elements the respective values at child - page level then you need to define a content place holder in the head tag of the master page. Another content place holder should be placed within the body of the master-page.

在子页面你将有两个内容占位符,一个用于头和其他身体。之后,你将需要把要紧code在各自的内容占位符。

At the child-page you will be having two content place holders, one for head and other for body. After which you will need to put the needful code in the respective content place holders.

这篇关于如何在母版页分配给现有的.aspx页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆