手机版

ASP.NET 2.0入门经典2(17)

时间:2025-07-04   来源:未知    
字号:

ASP.NET入门经典

"/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="/1999/xhtml" >

<head runat="server">

<title>CorporateMaster</title>

</head>

<body>

Corporation Name

<form id="form1" runat="server">

<div>

<asp:contentplaceholder

id="ContentPlaceHolderCorporate"

runat="server">

</asp:contentplaceholder>

</div>

</form>

</body>

</html>

下面的代码演示了Research department Master页面。这个页面最复杂,因为它既是Corporate页面的Content页面,同时也是Publication页面的Master页面。注意在第一行代码中,Master和MasterPageFile=将该页面设置为Corporate Master页面的内容。然后可以注意到<asp:ContentPlaceHolder>将其他页面作为自己的内容(在这里是Publication页面)。内容占位符必须全部包含在<asp:content>标记之内:

<%@ Master MasterPageFile="~/Corporate.master" Language="VB" %>

<asp:Content runat="server"

ASP.NET 2.0入门经典2(17).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
×
二维码
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)