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
771.5k
how to show popup when downloading excel file in C#
May 4 2016 10:02 PM
i have gridview data. i have one button called exporttoexcel when i click that button i want to export data into excel.
my code as follows
string attachment = "attachment; filename=GridviewDetails.xls";
Response.ClearContent();
Response.AddHeader("content-disposition", attachment);
Response.ContentType = "application/vnd.ms-excel";
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
Response.Write("");
Response.Write("<html xmlns:x=\"urn:schemas-microsoft-com:office:excel\">");
Response.Write("<body>");
Response.Write("<table border=1 bordercolor=black>");
Response.Write("<tr>");
Response.Write("<td colspan=5><b><center>");
Response.Write("GirdviewDetails");
Response.Write("</b></center></td>");
Response.Write("</tr>");
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
GridView1.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.Flush();
Response.Write("<table>");
Response.Write("</body>");
Response.Write("</html>");
Response.End();
When i click the export button the excel data is downloading directly,
i want to show popup. in that popup open save is to be there.
When i click the open button excel file to be opened.
When i click the save button excel file to be saved.
for that how can i do in asp.net using C#.
Reply
Answers (
1
)
Inserting more than 255 users to last byte array occurrence
MSMQ list the name and count the Queues