===============用过母版的来看看!!!===============
我在项目中用到了母版,然后这个母版并不是首页
这个母版布局如下
<body>
<form id= "form1 " runat= "server ">
<div>
<table border= "0 " cellpadding= "0 " cellspacing= "0 " style= "width: 590px ">
<tr>
<td colspan= "2 " style= "height: 19px ">
<asp:LinkButton ID= "lbtnBackFirstPage " runat= "server " OnClick= "lbtnBackFirstPage_Click "> 返回首页 </asp:LinkButton>
<asp:LinkButton ID= "lbtnBuy " runat= "server " OnClick= "lbtnBuy_Click "> 购买 </asp:LinkButton>
<asp:LinkButton ID= "lbtnBuyCart " runat= "server " OnClick= "lbtnBuyCart_Click "> 购物车 </asp:LinkButton> </td>
</tr>
<tr>
<td style= "width: 117px; height: 345px "> <asp:TreeView ID= "TreeView1 " runat= "server " DataSourceID= "SiteMapDataSource1 " Height= "506px "> </asp:TreeView> </td>
<td> <asp:ContentPlaceHolder ID= "ContentPlaceHolder1 " runat= "server "> </asp:ContentPlaceHolder> </td>
</tr>
</table>
<asp:SiteMapDataSource ID= "SiteMapDataSource1 " runat= "server " />
<a href= "file:///D:\Sparter\MyAccount.master "> </a>
</div>
</form>
</body>
里面有四个linkbutton是连接到其他页面!~!
但是当我点击树目录查看东西之后,再点这几个连接就找不到页面
如果不点击树目录就正常
不知道是什么原因......
我想过是不是要把那几个连接写到另一个页面,然后也要放ContentpalceHolder控件里去
大家有知道的吗?
------解决方案--------------------应该是你的linkbutton使用的是相对路径,当你跳转到其他目录的时候相对路径就不一样,所以就找不到