protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        
//在服务器端添加删除确认
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            
LinkButton btnDelete = (LinkButton)e.Row.FindControl("LinkButton1"); 
            
 btnDelete.Attributes.Add("onclick", "javascript:return " +"confirm('Are you sure you want to delete this record " +DataBinder.Eval(e.Row.DataItem, "编号") + "')"); 
        }
     } 

相关文章:

  • 2022-12-23
  • 2022-01-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-17
  • 2021-06-26
  • 2021-10-30
  • 2021-11-04
  • 2021-09-19
相关资源
相似解决方案