怎么通过一个判断来显示这个linkbutton按钮,在有主管的部门 和没主管的部门经行删除
1条回答 默认 最新
斯洛文尼亚旅游 2017-01-04 05:59关注<asp:Repeater runat="server" ID="rpList" OnItemDataBound="rpList_ItemDataBound"> <ItemTemplate><asp:Label runat="server" ID="lbMgr" Visible="false" Text='<%#Eval("主管部门字段") %>'></asp:Label> <asp:LinkButton ID="lbDel" Text="删除" runat="server"></asp:LinkButton> .............其他html代码 </ItemTemplate> </asp:Repeater>protected void rpList_ItemDataBound(object sender, RepeaterItemEventArgs e) { LinkButton lbDel = e.Item.FindControl("lbDel") as LinkButton; Label lbMgr = e.Item.FindControl("lbMgr") as Label; lbDel.Visible = lbMgr.Text == "有没有主管部门的判断内容"; }解决 无用评论 打赏 举报