TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
narasiman rao
NA
519
769k
how to show popup when downloading the excel file
May 4 2016 9:05 AM
i am exporting the gridview data to excel.
before it downloading i want to show the popup. for that how can i do using C#
My code as follows with out popup code
System.Threading.Thread.Sleep(3000);
System.IO.StringWriter sw = new System.IO.StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(sw);
gvEmpdetails.AllowPaging = false;
BindGrid();
//Applying stlye to gridview header cells
for (int i = 0; i < gvEmpdetails.HeaderRow.Cells.Count; i++)
gvEmpdetails.HeaderRow.Cells[i].Style.Add("background-color", "#df5015");
gvEmpdetails.RenderControl(htw);
Session["ResponseData"] = sw.ToString();
iframe1.Attributes.Add("src", "Download.aspx");
Response.ClearContent();
Response.Buffer = true;
Response.AddHeader("content-disposition", string.Format("attachment; filename={0}", "Employee.xls"));
Response.ContentType = "application/ms-excel";
string responseString = Session["ResponseData"] + "";
Response.Write(responseString);
Response.End();
from the above i want to add popup code before it is downloading to excel.
for that how can i do in asp.net using C#.
Reply
Answers (
1
)
windows phone and angularjs
saving the excel file in specific path in asp.net using C#