问题描述
母版页内容如下:<%@MasterLanguage="C#"AutoEventWireup="true"CodeFile="news.master.cs"Inherits="news"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><%@MasterLanguage="C#"AutoEventWireup="true"CodeFile="Main.master.cs"Inherits="SiteMaster"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"xml:lang="en"><headid="Head1"runat="server"><metahttp-equiv="Content-Type"content="text/html;charset=utf-8"/><title></title><scriptsrc="JS/jquery-1.6.js"type="text/javascript"></script><linkhref="css/public_all.css"rel="stylesheet"type="text/css"/><scripttype="text/javascript">$(function(){if($(".Middle_Right_Box_light").height()>$(".Middle_Left_Box_light").height()){$(".Middle_Left_Box_light").height($(".Middle_Right_Box_light").height());$(".Middle_Left_Box_Boder_In").height($(".Middle_Right_Box_In").height());}else{$(".Middle_Right_Box_light").height($(".Middle_Left_Box_light").height());$(".Middle_Right_Box_In").height($(".Middle_Left_Box_Boder_In").height());}});</script><linkhref="~/Styles/Site.css"rel="stylesheet"type="text/css"/><asp:ContentPlaceHolderID="HeadContent"runat="server"></asp:ContentPlaceHolder><styletype="text/css"><!--body{margin-left:0px;margin-top:0px;margin-right:0px;margin-bottom:0px;background-image:url(images/bj.jpg);}h1{font-size:24px;color:#FFFFFF;}.style1{width:496px;}.style3{width:952px;}.style4{width:100%;}.style5{width:130px;}--></style></head><body><formid="Form1"runat="server"><asp:ScriptManagerID="ScriptManager1"runat="server"></asp:ScriptManager><divclass="page"><divclass="header"><divclass="title"><h1>天津科技大学</h1></div><divclass="loginDisplay"></div><divclass="clearhideSkiplink"><asp:MenuID="NavigationMenu"runat="server"CssClass="menu"EnableViewState="false"IncludeStyleBlock="false"Orientation="Horizontal"><Items><asp:MenuItemNavigateUrl="~/Default.aspx"Text="主页"/><asp:MenuItemNavigateUrl="~/yudingjiaocai.aspx"Text="预订教材"/><asp:MenuItemNavigateUrl="~/jiaocaichaxun.aspx"Text="教材查询"/><asp:MenuItemNavigateUrl="~/kucunguanli.aspx"Text="库存管理"/><asp:MenuItemNavigateUrl="~/yonghuguanli.aspx"Text="用户管理"/></Items></asp:Menu></div></div><divclass="clear"><tableclass="style1"><tr><td><imgalt=""class="style3"src="file:///C:/Users/Administrator/Desktop/毕业设计/图片/科技大学.png"/></td></tr><tr><tdclass="style4"><tableclass="style4"><tr><tdcolspan="2"><asp:ContentPlaceHolderid="ContentPlaceHolder1"runat="server"></asp:ContentPlaceHolder></div></form></body></html>
解决方案
解决方案二:
。。。删掉一个
解决方案三:
<%@MasterLanguage="C#"AutoEventWireup="true"CodeFile="news.master.cs"Inherits="news"%><%@MasterLanguage="C#"AutoEventWireup="true"CodeFile="Main.master.cs"Inherits="SiteMaster"%>这明显就重复了,不报错才怪
解决方案四:
<%@MasterLanguage="C#"AutoEventWireup="true"CodeFile="news.master.cs"Inherits="news"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><%@MasterLanguage="C#"AutoEventWireup="true"CodeFile="Main.master.cs"Inherits="SiteMaster"%>--------------------------删掉一个,你得对照下母版页的结构,子页面的内容<asp:ContentPlaceHolder结构要与母版页一致
解决方案五:
。。。。。无语ing,看楼上的回复吧!