?
Solved

page refresh after exporting to excel

Posted on 2008-10-20
2
Medium Priority
?
1,672 Views
Last Modified: 2013-11-07
Hi all,

how to you repost a page after exporting the content of a datagrid into an excel file?
the following is the scenario that i am working on:

1- datagrid's populated based on a query's resultset.
2- datagrid is manipulated, i.e. data may be updated, rows selected via check boxes.
3- back-end data is updated
4- selected rows are exported to excel

my problem here is such that, after i am able to export to excel using the code below:
        attach = "attachment;filename=[excel filename]"
        Response.ClearContent()
        Response.ContentType = "application/vnd.ms-excel"
        Response.AddHeader("content-disposition", attach)
            Response.Write(stringWrite.ToString)
            Response.End()
            
i would like to be able to repost the page to be able to do a refresh.
how do you code to initiate a page refresh at runtime?

thanks
0
Comment
Question by:praetorean
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Expert Comment

by:M3mph15
ID: 22765132
Why not Redirect to the same page.
So it becomes
attach = "attachment;filename=[excel filename]"
        Response.ClearContent()
        Response.ContentType = "application/vnd.ms-excel"
        Response.AddHeader("content-disposition", attach)
            Response.Write(stringWrite.ToString)
            Response.End()
        Response.Redirect("Page.aspx")
0
 

Accepted Solution

by:
praetorean earned 0 total points
ID: 22773111
redirecting does not seem to work...
the page still will not re-post...

and if i put the code on top, excel export would not work either...

would you know any other ways?

thanks anyways...
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question