关于新控件,如何用c# 程式控制template里的内容??
<ItemTemplate>
<tr class="item" runat="server">
<td>
<asp:Label ID="CountryCodeLabel" runat="server"
Text='<%# Eval("CountryRegionCode")%>' />
</td>
<td>
<asp:Label ID="NameLabel" runat="server"
Text='<%# Eval("Name")%>' />
</td>
</tr>
</ItemTemplate>
如我要动态添加列如何添加???我们的后台页面需要根据不同的查询直接生成列 总不能每个页面都要一个一个写 <td>
<asp:Label ID="CountryCodeLabel" runat="server"
Text='<%# Eval("CountryRegionCode")%>' />
</td>
<ItemTemplate>
<tr class="item" runat="server">
<td>
<asp:Label ID="CountryCodeLabel" runat="server"
Text='<%# Eval("CountryRegionCode")%>' />
</td>
<td>
<asp:Label ID="NameLabel" runat="server"
Text='<%# Eval("Name")%>' />
</td>
</tr>
</ItemTemplate>
如我要动态添加列如何添加???我们的后台页面需要根据不同的查询直接生成列 总不能每个页面都要一个一个写 <td>
<asp:Label ID="CountryCodeLabel" runat="server"
Text='<%# Eval("CountryRegionCode")%>' />
</td>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货