0
我正在創建一個在不同頁面中具有不同菜單的網站。所以我正在創建一個母版頁,分別擁有3個頁面標題,菜單和內容的內容佔位符。我無法爲此母版頁創建內容頁面。任何幫助,將不勝感激。如果我沒有遵守正確的指導方針,請原諒我,因爲我是新手。在ASP.NET主頁中使用多個contentPlaceHolders
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="PTS.Master.cs" Inherits="PTS.UI.Site1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Patient Tracker System</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
<style type="text/css">
.style1
{
font-size: small;
}
</style>
</head>
<body>
<section id = "main>
<asp:ContentPlaceHolder ID="ContentPlaceHolderMain" runat="server">
<form id="form1" runat="server">
<div id="wrapper">
<div id="page">
<div id="page-bgtop">
<div id="page-bgbtm">
<div id="content">
<!-- Enter Your Contents Here-->
<asp:ContentPlaceHolder ID="ContentPlaceHolderContent" runat="server">
</asp:ContentPlaceHolder>
</div>
<!-- end #content -->
<div id="logo">
<h1 class="style1"><a href="#">Patient Tracker System</a></h1>
<br />
<br />
<asp:ContentPlaceHolder ID="ContentPlaceHolderPageHead" runat="server">
</asp:ContentPlaceHolder>
</div>
<div id="sidebar">
<%--Paste your Customized Menus--%>
<asp:ContentPlaceHolder ID="ContentPlaceHolderMenu" runat="server">
</asp:ContentPlaceHolder>
</div>
<!-- end #sidebar -->
<div style="clear: both;"> </div>
</div>
</div>
</div>
<!-- end #page -->
</div>
<div id="footer">
<p>Copyright (c) 2012 Patient Tracker System.</p>
</div>
<!-- end #footer -->
</form>
</asp:ContentPlaceHolder>
</section>
</body>
</html>
什麼是你的問題? – JohnB
你不需要添加這個地方持有人' ' –
Rab