日期:2010-07-22 浏览次数:20457 次
在asp.net 2.0中,如果在一个masterpage页面中,使用服务端的table控件的话,如下所示,会在设置视图时,没了其中的contentplaceholder,
<asp:Table ID="tbl" runat="server">
<asp:TableRow>
<asp:TableCell>
This is my header!
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
<asp:contentplaceholder id="_content" runat="server">
</asp:contentplaceholder>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
This is my footer!
</asp:TableCell>
</asp:TableRow>
</asp:Table>
而如果用普通的页面table的话,则不会出现如下的问题,
<table>
<tr>
<td>
This is my header!
</td>
</tr>
<tr>
<td>
<asp:contentplaceholder id="_content" runat="server">
</asp:contentplaceholder>
</td>
</tr>
<tr>
<td>
This is my footer!
</td>
&n