Repeater中ImageBtn的删除等操作

我的广告单元,有空点一下哦,谢谢!
<asp:Repeater ID="RPMyFav" runat="server">
                                <ItemTemplate>
                                    <tr>
                                        <td align="left" style="border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #CCCCCC">
                                            <img src="images/RSS.png" style="height: 23px; width: 23px" align="middle" /><a href="MemberNews.aspx?id=<%# Eval("info_id").ToString() %>"
                                                target="_blank"><%# Eval("username").ToString() %></a>
                                        </td>
                                        <td style="border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #CCCCCC; width:24px;">
                                            <asp:ImageButton ID="imgbtnDel" ImageUrl="images/Close.png" CommandName=’<%# Eval("fiid").ToString() %>’ OnCommand="imgbtnDel_Click" OnClientClick=’javascript:return confirm( "确定删除? ")’ Width="23px" runat="server" ToolTip="删除该条信息" CausesValidation="False" />
                                        </td>
                                    </tr>
                                </ItemTemplate>
</asp:Repeater>
//删除
        protected void imgbtnDel_Click(object sender, CommandEventArgs e)
        {
            string fiid = e.CommandName.ToString();
            favoriteinfoController fc = new favoriteinfoController();
            if (fc.DelFavoriters(fiid))
            {
                PagerDateBind();
                InfoBind();
                this.lbMsg.Text = "删除成功!";
            }
            else
                this.lbMsg.Text = "删除失败,请您重试!";
        }
posted @ 2011-08-17 23:46  jackchain  阅读(226)  评论(0编辑  收藏  举报