问题描述
母版页<%@MasterLanguage="C#"AutoEventWireup="true"CodeBehind="Front.Master.cs"Inherits="WebShop.front"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><headid="Head1"runat="server"><title></title><asp:ContentPlaceHolderID="head"runat="server"></asp:ContentPlaceHolder></head><body><formid="form1"runat="server"style="position:fixed;right:auto;left:auto;clear:both;top:15px;width:1050px;height:1350px;"><tablealign="center"style="margin-left:150px;height:1352px;width:814px;"><tr><td><divid="divHead"class="HeadCss"><tableclass="head-table"><tr><tdcolspan="2"><table><tr><tdrowspan="2"class="auto-style2"><imgalt="igou"src="Images/logoShop.jpg"style="width:345px;height:64px"/></td><tdclass="auto-style1"> </td><td> <imgalt=""src="Images/login.gif"style="width:18px;height:18px"/> <asp:HyperLinkID="hlinkLogin"runat="server"NavigateUrl="~/Login.aspx">登录</asp:HyperLink> | <asp:HyperLinkID="hlinkRegist"runat="server"NavigateUrl="~/Register.aspx">注册</asp:HyperLink></td><tdclass="auto-style13"><imgalt=""src="Images/cart.gif"style="width:26px;height:19px;margin-left:12px;"/></td><tdstyle="text-align:center;"class="style3"></td></tr><tr><tdcolspan="4"class="style4"><tablestyle="margin-left:2px;text-align:left;width:529px;"><tr><tdclass="auto-style8"><spanclass="auto-style14">关键字</span></td><tdclass="auto-style15"><asp:TextBoxID="txtSearchKey"runat="server"Width="170px"Height="21px"style="margin-left:0px"></asp:TextBox></td><tdclass="auto-style8"><asp:ImageButtonID="ImageButtonSearch"runat="server"ImageUrl="~/Images/f_bt.gif"OnClick="ImageButtonSearch_Click"/></td><tdclass="auto-style7"><imgalt="igou"src="Images/hotline.jpg"style="width:172px;height:61px"/></td></tr></table></td></tr></table></td></tr><tr><tdcolspan="2"><divclass="head-banner"id="foot"><br/><br/></div></td></tr><tr><tdstyle="width:250px"><asp:SiteMapPathID="SiteMapPath1"runat="server"></asp:SiteMapPath></td><tdalign="right"><asp:LabelID="labUser"runat="server"Text=""></asp:Label><asp:ImageID="img_Cart"runat="server"ImageUrl="~/Images/cart.gif"Visible="False"/><asp:LinkButtonID="linkBtn_mycart"runat="server"PostBackUrl="~/Cart.aspx"Visible="False">我的购物车</asp:LinkButton> <asp:LabelID="Label1"runat="server"Text="|"Visible="False"></asp:Label><asp:LinkButtonID="linkBtn_Exit"runat="server"OnClick="linkBtn_Exit_Click"Visible="False">注销</asp:LinkButton> <asp:LinkButtonID="linkBtn_MyOrder"runat="server"OnClick="linkBtn_MyOrder_Click"Visible="false">我的订单</asp:LinkButton></td></tr></table></div></td></tr><tr><td><tablestyle="border-style:none;border-color:inherit;border-width:0px;width:905px;border-spacing:0px;clear:both;margin-right:87px;"cellpadding="0"cellspacing="0"><tr><td><divid="divMain_Left"class="Main_Left"><table><tr><td><imgsrc="Images/sort.gif"style="width:174px;height:43px;margin-left:0px;"alt=""/></td></tr><tr><tdstyle="vertical-align:bottom;"class="auto-style16"></td></tr></table><asp:TreeViewID="TreeView1"runat="server"DataSourceID="XmlDataSource1"Width="164px"OnSelectedNodeChanged="TreeView1_SelectedNodeChanged"style="font-size:medium;text-align:left"><DataBindings><asp:TreeNodeBindingDataMember="Categry"NavigateUrlField="#InnerText"TextField="Categry"ValueField="Categry"/><asp:TreeNodeBindingDataMember="CategryChild"NavigateUrlField="#InnerText"TextField="CategryChild"ValueField="CategryChild"/></DataBindings></asp:TreeView><asp:XmlDataSourceID="XmlDataSource1"runat="server"DataFile="~/Categry.xml"></asp:XmlDataSource></div></td><tdvalign="top"class="auto-style17"><divid="divMain_Contain"class="Main_Contain""><asp:ContentPlaceHolderID="ContentPlaceHolder1"runat="server"></asp:ContentPlaceHolder></div></td></tr></table></td></tr><tr><td><divid="divFooter"class="Footer"></div></td></tr></table></form></body></html>内容页:<%@PageTitle=""Language="C#"MasterPageFile="~/Front.Master"AutoEventWireup="true"CodeBehind="WebForm1.aspx.cs"Inherits="UI.WebForm1"%><asp:ContentID="Content1"ContentPlaceHolderID="head"runat="server"></asp:Content><asp:ContentID="Content2"ContentPlaceHolderID="ContentPlaceHolder1"runat="server"></asp:Content>
解决方案
解决方案二:
<asp:ContentPlaceHolderID="ContentPlaceHolder1"runat="server"></asp:ContentPlaceHolder>把你外面这堆table扔到这个里面去