zoukankan      html  css  js  c++  java
  • listview里的button事件

    1.

    <asp:ListView ID="lvBalance" runat="server" >
                                    <LayoutTemplate>
                                        <div id="listDiv" style="100%;overflow-y:auto;">
                                            <table border=0 cellpadding=0 cellspacing=0 style="float:left;table-layout:fixed;" class="datagrid-body easydatagrid">
                                                <asp:PlaceHolder id=itemPlaceholder runat=server/>
                                            </table>
                                            <div id="div999" style='display: none; 200px;' class="div2"></div>
                                        </div>
                                    </LayoutTemplate>
                                    <ItemTemplate>
                                        <tr><td>

    <asp:LinkButton ID="lb_delete" runat="server" CommandArgument='<%#Eval("ItemCode")%>' OnClientClick="return confirm('确定删除此条信息?');" onclick="lb_delete_Click" Text="删除"></asp:LinkButton>

    <</td>/tr>
                                    </ItemTemplate>   
                                </asp:ListView>

    2.

    protected void lb_delete_Click(object sender, EventArgs e)
           {
               LinkButton lbdelete = (LinkButton)sender;
               BLLAccount bll_updateBalance = new BLLAccount();
               if (hd_vehiclecode.Value != "" && lbdelete.CommandArgument != "")
               {
                   if (bll_updateBalance.deleteBalance(hd_vehiclecode.Value, lbdelete.CommandArgument) == true)
                   {
                       this.ClientScript.RegisterStartupScript(this.GetType(), this.Title, "alert('删除成功!');", true);
                       Datebind();
                   }
                   else
                   {
                       this.ClientScript.RegisterStartupScript(this.GetType(), this.Title, "alert('删除失败!');", true);
                   }
               }
           }

  • 相关阅读:
    poj 3590 The shuffle Problem——DP+置换
    poj 3128 Leonardo's Notebook——思路(置换)
    bzoj 1004 [HNOI2008]Cards && poj 2409 Let it Bead ——置换群
    bzoj 1119 [POI2009]SLO && bzoj 1697 [Usaco2007 Feb]Cow Sorting牛排序——思路(置换)
    bzoj 3944 Sum —— 杜教筛
    bzoj 1367 [ Baltic 2004 ] sequence —— 左偏树
    bzoj 2093 [ Poi 2010 ] Frog —— 滑动窗口 + 倍增
    bzoj 2276 [ Poi 2011 ] Temperature —— 单调队列
    bzoj 2069 [ POI 2004 ] ZAW —— 多起点最短路 + 二进制划分
    NOIP2007普及 守望者的逃离
  • 原文地址:https://www.cnblogs.com/wuchao/p/2745044.html
Copyright © 2011-2022 走看看