ASP.Net中的母版页 [英] Master Page in ASP.Net
本文介绍了ASP.Net中的母版页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
-i在asp.net中制作了2个网页表单。
-now为他们的UI我创建了MasterPage。
-But不知道如何将它设置为起始页。
-以及如何与2个网页表单进行交互
请帮助,
问候
-i have made 2 web forms in asp.net..
-now for their UI I have created MasterPage.
-But doesn't know how to set it as start page.
-and how to interact it with the 2 web forms
Please Help,
Regards
推荐答案
在Visual Studio中,右键单击解决方案资源管理器中的网站 - >属性页 - >开始选项 - >具体页面。在那里你可以设置启动页面。
问候..:)
In Visual Studio,Right click the Website in Solution Explorer -> Property Pages -> Start Options -> Specific Page. There you can set start up page.
Regards..:)
设置起始页:
1)转到解决方案资源管理器
2)右键单击要启动页面的页面。
3)选择设置为起始页
用于与两个网络表单交互
1)<%@ Page Title =OHD-UserProfileLanguage =C#MasterPageFile =〜/ Site.MasterAutoEventWireup =trueCodeFile =User_Profile.aspx.csInherits =OnlineHelpDesk_User_Profile%>
2)用sitemastername.Master更改MasterPageFile。 />
3)替换< asp:content>的ContentPlaceHolderID网站管理员ContentPlaceHolderID
For set start page:
1) Goto solution explorer
2) Right click on the page which you want start page.
3) Select "Set As Start Page"
For Interact with two web forms
1)<%@ Page Title="OHD-UserProfile" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeFile="User_Profile.aspx.cs" Inherits="OnlineHelpDesk_User_Profile" %>
2) Change "MasterPageFile" with your "sitemastername.Master" .
3) Replace"ContentPlaceHolderID" of <asp:content> tag of web form with your sitemaster "ContentPlaceHolderID"
这篇关于ASP.Net中的母版页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文