更新时间:2023-12-01 16:36:16
1定义在设计中固定的元素,并把它们新创建的母版页内
1- Define the fixed elements in your design, and put them inside the newly created master page
2 - 定义动态的,并添加 ASP:的ContentPlaceHolder
他们(最常见的一个 HEAD
,一个是在你的 BODY
,主要内容和一个端内容的如果适用的)
2- Define the dynamic ones, and add asp:ContentPlaceHolder
for them ( most commonly one for HEAD
, one for main content in your BODY
, and one for side content "if applicable")
3在你的页面,添加的MasterPageFile =〜/ MASTER_PAGE_PATH
Page指令里面。
3- In your pages, add MasterPageFile="~/MASTER_PAGE_PATH"
inside the Page directive.
4-添加 ASP:内容
页面内的部分,将用来保存在你的页面的动态内容,而且不要忘记引用正确的的ContentPlaceHolder ID
。
4- Add asp:Content
sections inside your pages which will hold the dynamic content in your pages, and don't forget to reference the correct ContentPlaceholder ID
.
5复制您的网页内容,这些 ASP内部:内容
部分,并且BOOOOM ....你做
5- Copy your page content inside these asp:content
sections, and BOOOOM....you are done.