日期:2014-05-18 浏览次数:20462 次
//绑定明细超链接 for (int i = 0; i < Repeater1.Items.Count; i ++ ) { Label lbl_id = (Label)Repeater1.Items[i].FindControl("Lbl_id"); string script = "javascript:openTab('联系人明细','/party/ContactEdit.aspx?contactID=" + lbl_id.Text + "')"; ((LinkButton)Repeater1.Items[i].FindControl("Btn_detail")).OnClientClick = script; }
<asp:Repeater ID="Repeater1" runat="server"> <ItemTemplate> <tr> <td><asp:CheckBox ID="CheckBox1" runat="server" /></td> <td><%# Container.ItemIndex + 1 %></td> <td style="display:none"><asp:Label ID="Lbl_id" runat="server" Text='<%# Eval("contactID") %>'></asp:Label></td> <td><asp:Label ID="Lbl_name" runat="server" Text='<%# Eval("contactName") %>'></asp:Label></td> <td><asp:Label ID="Lbl_party_name" runat="server" Text='<%# Eval("tbl_law_party.partyName") %>'></asp:Label></td> <td><asp:Label ID="Lbl_telephone1" runat="server" Text='<%# Eval("telephone1") %>'></asp:Label></td> <td><asp:Label ID="Lbl_mobile1" runat="server" Text='<%# Eval("mobile1") %>'></asp:Label></td> <td><asp:HyperLink ID="Btn_detail" runat="server">明细</asp:HyperLink></td> </tr> </ItemTemplate> </asp:Repeater>