您的位置:首页 > 其它

DataList实现行转列及条件式绑定 DataList1.RepeatColumns

2016-07-20 08:47 357 查看
<asp:DataList ID="DataList1" runat="server">
<ItemTemplate>
<% if(aa=="0"){ aa="1";%>
<table class="tb">
<tr style="height:23px;">
<td>111</td>
</tr>
<tr style="height:23px;">
<td>评估得分</td>
</tr>
<tr style="height:100px;">
<td>评估说明</td>
</tr>
</table>
<%} else {%>
<table class="tb">
<tr style="height:22px;">
<td><asp:Label ID="Label1" runat="server" Text="Label"><%#Eval("id") %></asp:Label></td>
</tr>
<tr style="height:22px;">
<td><asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("name") %>'></asp:TextBox></td>
</tr>
<tr  style="height:100px;">
<td><asp:TextBox ID="TextBox2" runat="server" Text='<%# Eval("sex") %>'></asp:TextBox></td>
</tr>
</table><%} %>
</ItemTemplate>
</asp:DataList>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: