如何在不更改内容页面内容的情况下将母版页面添加到现有页面

如何在不更改内容页面内容的情况下将母版页面添加到现有页面

本文介绍了如何在不更改内容页面内容的情况下将母版页面添加到现有页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

晚安朋友,
1.我设计了一个带有两个标签,两个文本框和一个按钮的网页.只需登录表单即可.
2.我在网页之后创建了母版页.
3.在该主页中,我添加了图像,背景色等.
4.我尝试使用母版页访问现有网页

错误:
我只能获取母版页布局,看不到标签,文本框和按钮.

请帮帮我.

预先表示感谢.

Good Evening Friends,
1. I have designed a webpage with two labels and two textbox and with a button.Just login form layout.
2. I have created the masterpage after the webpage.
3. In that master page i have added images, background color and so on.
4. I have tried to use the master page to the existing webpage

ERROR:
I am able to get the master page layout only, I can''t see the labels, textboxes and buttons.

Please help me.

Thanks in advance.

推荐答案

MasterPageFile="masterpage url"


然后使用相应的ContentPlaceHolderID添加内容控件:


Then add the content control with the corresponding ContentPlaceHolderID:

<asp:content id="Content2" contentplaceholderid="ContentPlaceHolder1" runat="Server" xmlns:asp="#unknown"></asp:content>br mode="hold" />Then cut/paste your pages html into that... Note that all head and body html components should be removed as they are already covered in the master page.



这篇关于如何在不更改内容页面内容的情况下将母版页面添加到现有页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 04:00