特色栏目

ASP源码

PHP源码

.NET源码

JSP源码

游戏频道
专题合集
关闭菜单
首页> ASP.NET教程> ASP.NET2.0下为GridView添加服务器端删除确认!

ASP.NET2.0下为GridView添加服务器端删除确认!

时间:2009-06-30 17:02:30 作者:互联网
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        //在服务器端添加删除确认
        if (e.***.RowType == Da***ontrolRowType.DataRow)
        {
             LinkButton btnDelete = (LinkButton)e.***.FindControl("LinkButton1");
             bt***lete.Attributes.Add("onclick", "javascript:return " +"confirm('Are you sure you want to delete this record " +Da***inder.Eval(e.***.DataItem, "编号") + "')");
        }
     }
相关文章 最新文章

相关应用

热门文章

猜你喜欢

返回顶部