DataList
<asp:DataList ID="DataList1" runat="server">
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CommandName="updateInfo" CommandArgument='<%#Eval("id") %>'>
</asp:LinkButton>
</ItemTemplate>
</asp:DataList>
datatable dt=查询
this.DataList1.DataSource = dt;
this.DataList1.DataBind();
数据库中id有0和1,我想实现如果是0的就把所对应的LinkButton禁用,怎么做呀
asp
DataList?
LinkButton
------解决方案-------------------- <asp:LinkButton ID="LinkButton1" runat="server" CommandName="updateInfo" Enable='<%#Eval("id").ToString().Trim()==1 %>'>