九色国产,午夜在线视频,新黄色网址,九九色综合,天天做夜夜做久久做狠狠,天天躁夜夜躁狠狠躁2021a,久久不卡一区二区三区

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
GridView 刪除數(shù)據(jù) 方法大全【帶提示信息】

通用js:

<script type="text/javascript">
                function delete_mail()
    {
     msg='刪除后數(shù)據(jù)將無(wú)法恢復(fù),確認(rèn)要?jiǎng)h除所選信息么?';
     if(window.confirm(msg))
      return true;
     else
      return false;
    }
    </script>

 

1、按鈕刪除

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False">
                            <Columns>
                                <asp:BoundField DataField="TE_ID" HeaderText="管理員編號(hào)" />
                                <asp:BoundField DataField="USERNAME" HeaderText="登錄用戶名" />
                                <asp:BoundField DataField="TRUENAME" HeaderText="真實(shí)姓名" />
                                <asp:BoundField DataField="CJ_TIME" HeaderText="創(chuàng)建時(shí)間" />
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <a href="look_teadmin.aspx?bianhao=<%# Eval("TE_ID")%>" onclick="return delete_mail()">永久刪除</a>
                                    </ItemTemplate>
                                </asp:TemplateField>

                            </Columns>
                      </asp:GridView>

后臺(tái)

            string bianhao = Request.QueryString["bianhao"];
            if (bianhao == "" || bianhao == null)
                bangding();
            else
            {
                TE_ADMIN_BIZ biz = new TE_ADMIN_BIZ();
                biz.Del_Admin_Biz(Convert.ToInt32(bianhao));
                bangding();
            }

 

2、LinkButton 刪除

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False">
                            <Columns>
                                <asp:BoundField DataField="TE_ID" HeaderText="管理員編號(hào)" />
                                <asp:BoundField DataField="USERNAME" HeaderText="登錄用戶名" />
                                <asp:BoundField DataField="TRUENAME" HeaderText="真實(shí)姓名" />
                                <asp:BoundField DataField="CJ_TIME" HeaderText="創(chuàng)建時(shí)間" />
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="return delete_mail()" CommandArgument='<%# Eval("TE_ID")%>' OnCommand="page_onclick"> 永久刪除 </asp:LinkButton></td>

                                    </ItemTemplate>
                                </asp:TemplateField>

                            </Columns>
                      </asp:GridView>

后臺(tái)

protected void page_onclick(Object sender, CommandEventArgs e)
    {
        int bianhao = Convert.ToInt32(e.CommandArgument);
        TE_ADMIN_BIZ biz = new TE_ADMIN_BIZ();
        biz.Del_Admin_Biz(Convert.ToInt32(bianhao));
        bangding();
    }

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
點(diǎn)擊textbox彈出模態(tài)窗口,選擇后返回主頁(yè)面并賦值textbox
文件下載相關(guān)知識(shí)
ASP.NET中GridView控件ButtonField的使用
GridView 72般絕技
ASP.NET 2.0輕松實(shí)現(xiàn)數(shù)據(jù)庫(kù)應(yīng)用開發(fā)
ASP.NET查詢ACCESS數(shù)據(jù)庫(kù)的內(nèi)容并在DATAVIEW中顯示出來(lái)
更多類似文章 >>
生活服務(wù)
熱點(diǎn)新聞
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服