当前位置:编程学习 > C#/ASP.NET >>

点击girdview中链接激发了什么事件

girdview中有一列,想做到电击此列某一行数据,实现链接跳转,同时激发一个事件,实现数据库表的更新,请问点击链接激发的事件名称是什么 --------------------编程问答-------------------- 可以再另外个页面写更新事件 接受参数那个页面 --------------------编程问答-------------------- 该列用模板列
用linkbutton来做
在linkbutton的click事件里写 --------------------编程问答-------------------- 设置CommandName属性后可以发生OnRowCommand事件。 --------------------编程问答-------------------- 设置CommandName属性后可以发生OnRowCommand事件。

用哪种列,用ButtonField如何链接呀???? --------------------编程问答-------------------- 用 
<a href="XXXX.aspx?EidtID=<%#Eval("ID")编   辑</a> --------------------编程问答-------------------- 用   
<a   href="XXXX.aspx?EidtID= <%#Eval("ID")编       辑 </a>  
 
 
用什么事件呀 --------------------编程问答-------------------- HTML代码:
    <script language="javascript" type="text/javascript">
        function addDepartment()
        {
            var widht = 200;
            var height = 200;
            window.showModalDialog("ElecLevelInfo.aspx","","scroll:no;status:0;help:0;dialogWidth:350px;dialogHeight:200px;");
        }
        function updDepartment(uid)
        {
            window.showModalDialog("ElecLevelInfo.aspx?uid="+uid,"","scroll:no;status:0;help:0;dialogWidth:350px;dialogHeight:200px;");
        }
    </script>


                                                    <asp:TemplateField HeaderText="操作">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="LinkButton2" runat="server" CommandName="upd"  CommandArgument='<%# Eval("级别编号") %>' OnClientClick='<%#"updDepartment("+Eval("级别编号")+")" %>'>修 改</asp:LinkButton>
                                                            <asp:LinkButton ID="LinkButton1" runat="server" CommandName="del" OnClientClick="return window.confirm('确定删除?')"
                                                                CommandArgument='<%# Eval("级别编号") %>'>删 除</asp:LinkButton>
                                                        </ItemTemplate>
                                                        <HeaderStyle Width="120px" />
                                                        <ItemStyle HorizontalAlign="Center" />
                                                    </asp:TemplateField>

后台代码:

    protected void gvElecLevel_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        ElecLevel m_ElecLevel = new ElecLevel();
        if (e.CommandName.Equals("del"))
        {
            m_ElecLevel.delElecLevel(Convert.ToInt32(e.CommandArgument));
        }
        getElecLevel("");
    }
--------------------编程问答-------------------- 用jquery做啊 --------------------编程问答-------------------- 看GRIDVIEW有哪些事件吧```````很明显的啊```````
补充:.NET技术 ,  ASP.NET
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,