。。。

来源:互联网 发布:云浩软件企汇通 编辑:程序博客网 时间:2024/05/16 11:46

删除时弹出对话框提醒用户确认删除

 

 if (e.Row.RowType != DataControlRowType.DataRow )
        {
            return;
        }
        HyperLink link = e.Row.Cells[1].Controls[0] as HyperLink ;
        LinkButton lbtn = e.Row.Cells[7].Controls[0] as LinkButton;
        if (lbtn !=null)
        {
            lbtn.Attributes.Add ("onclick", " return confirm('确信要删除—"+link.Text +"—吗?');");
        }

 

原创粉丝点击