datalist怎么嵌套表格??
<form id= "Form1 " method= "post " runat= "server ">
<TABLE id= "Table1 " style= "Z-INDEX: 101; LEFT: 216px; WIDTH: 448px; POSITION: absolute; TOP: 24px; HEIGHT: 272px "
cellSpacing= "0 " cellPadding= "0 " width= "448 " border= "0 " align= "center ">
<TR>
<TD style= "HEIGHT: 46px ">
<asp:Label id= "Label2 " runat= "server " Font-Bold= "True "> wenti: </asp:Label>
<asp:Label id= "Label1 " runat= "server "> Label </asp:Label> </TD>
</TR>
<TR>
<TD> <p> <FONT face= "宋体 " id= "FONT1 "> </FONT>
<asp:DataList id= "DataList1 " DataKeyField= "id " runat= "server " BorderColor= "#3366CC " BorderStyle= "None "
BackColor= "White " CellPadding= "4 " GridLines= "Both " BorderWidth= "1px " Width= "248px ">
<SelectedItemStyle ForeColor= "#CCFF99 " BackColor= "#009999 "> </SelectedItemStyle>
<AlternatingItemStyle HorizontalAlign= "Left " VerticalAlign= "Top "> </AlternatingItemStyle>
<FooterStyle ForeColor= "#003399 " BackColor= "#99CCCC "> </FooterStyle>
<ItemStyle ForeColor= "#003399 " BackColor= "White "> </ItemStyle>
<ItemTemplate>
ID号:
<asp:Label ID= "idLabel " runat= "server " Text= ' <%# DataBinder.Eval(Container.DataItem, "id ")%> '>
</asp:Label> <br />
姓名:
<asp:Label ID= "nameLabel " runat= "server " Text= ' <%# DataBinder.Eval(Container.DataItem, "username ")%> '>
</asp:Label> <br />
dep:
<asp:Label ID= "depLabel " runat= "server " Text= ' <%# DataBinder.Eval(Container.DataItem, "userkind ")%> '>
</asp:Label> <br />
wenti:
<asp:Label ID= "wentilistLabel " runat= "server " Text= ' <%# DataBinder.Eval(Container.DataItem, "wenti ")%> '>
</asp:Label> <br />
IP:
<asp:Label ID= "ipaddressLabel " runat= "server " Text= ' <%# DataBinder.Eval(Container.DataItem, "ipaddress ")%> '>
</asp:Label> <br />
status:
<asp:Label ID= "chuliLabel " runat= "server " Text= ' <%# DataBinder.Eval(Container.DataItem, "status ")%> '>
</asp:Label> <br />
sydate:
<asp:Label ID= "sysdateLabel " runat= "server " Text= ' <%# DataBinder.Eval(Container.DataItem, "sysdate ")%> '>
</asp:Label> <br />
list:
<asp:Label ID= "wentiLabel " runat= "server " Text= ' <%# DataBinder.Eval(Container.DataItem, "wentilist ")%> '>
</asp:Label> <br />
<br />
</ItemTemplate>
<HeaderStyle Font-Bold= "True " ForeColor= "#CCCCFF " BackColor= "#003399 "> </HeaderStyle>
</asp:DataList> </p>
<p> </p>
<p> <FONT face= "宋体 "> </FONT>
</p>
<p> </p>
</TD>
</TR>
<TR>
<TD> <FONT face= "宋体 "> </FONT> </TD>
</TR>
</TABLE>
</form>
[解决办法]
直接把表格放进去就可以
<asp:DataList id= "DataList1 " Width= "550px " runat= "server ">
<ItemTemplate>
<TABLE cellSpacing= "0 " cellPadding= "4 " width= "550 " border= "0 ">
<TR>
<TD width= "5% " align= "right "> <IMG height= "7 " src= "img/index_member_point.gif " width= "7 "> </TD>
<TD class= " stytd1 " width= "76% " height= "20 ">
<A href= 'technicdetail.aspx?id= <%#DataBinder.Eval(Container.DataItem, "id ", "{0} ")%> ' target=_blank>
<FONT color= "#333333 ">
<%# DataBinder.Eval(Container.DataItem, "title ", "{0} ") %>
</FONT> </A>
<asp:Image ImageUrl= "img/new.gif " Visible= ' <%# DataBinder.Eval(Container.DataItem, "new ") %> ' Runat=server >
</asp:Image>
</TD>
</TR>
</TABLE>
</ItemTemplate>
</asp:DataList>
[解决办法]
<ItemTemplate> 此模板只是将里面的内容进行迭代.所以你可以直接
<ItemTemplate>
<table> Content </table>
</ItemTemplate>