When open excel i want to show popup
I am exproting the gridview data to excel.it is downloading directly.
i want to show the popup before downloading.
My code as follows
Response.Clear();
Response.Buffer = true;
Response.ClearContent();
Response.ClearHeaders();
Response.Charset = "";
string FileName = "Employeess.xls";
StringWriter strwritter = new StringWriter();
HtmlTextWriter htmltextwrtter = new HtmlTextWriter(strwritter);
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("Content-Disposition", "attachment;filename=" + FileName);
gvEmpdetails.GridLines = GridLines.Both;
gvEmpdetails.HeaderStyle.Font.Bold = true;
gvEmpdetails.RenderControl(htmltextwrtter);
Response.Write(strwritter.ToString());
Response.End();
in my above code when i export the gridview to excel. gridview data is exproting into excel.
but before exproting into excel i want to show popup as follows
Yes No Cancel
for that how can i do in asp.net using C#.