时间:2020-12-26 12:15:10 | 栏目:.NET代码 | 点击:次
首先,我们前端的代码如下:
protected void gridViewDxjk_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton btn = (LinkButton)e.Row.Cells[1].Controls[0];
if (btn.Text.Equals("删除"))//?h除?o才加提示?息
btn.OnClientClick = "if (confirm('你确认要删除?')) javascript:__doPostBack('gridViewDxjk','Delete$" + e.Row.RowIndex.ToString() + "'); else return false;";
}
}