GridView 删除确认 问题?

<asp:TemplateField HeaderText="删除">
          <ItemTemplate>
                <asp:LinkButton runat="server" ID="lnkDelete" OnClick="btnDocDelete_Click" OnClientClick="return confirm('您真的要删除此行吗?')"
                          Width="30px">删除</asp:LinkButton>
                 </ItemTemplate>
</asp:TemplateField>

  protected void btnDocDelete_Click(object sender, EventArgs e)
    {
        GridViewRow row = (sender as LinkButton).NamingContainer as GridViewRow;
        int docID = Convert.ToInt32(this.gView.DataKeys[row.RowIndex].Value);
        this.m_DocGateway.DeleteDoc(docID);
        string strPath = this.m_strPath + "\\" + this.gView.DataKeys[row.RowIndex]["Title"].ToString();
        File.Delete(strPath);

        this.BindData(0);
    }

原文地址:https://www.cnblogs.com/DotNet1010/p/1142527.html