Thursday, January 8, 2015

Page Refresh after Downloading the Excel File

Hi,

In our Visual web part I am downloading the excel file by writing the code as below

This has been written in the button click event
Now issue has raised, i.e. if user wants to download the file second time on the same browser.
He has to refresh the browser and click the button to download the file.
Generally to refresh the current page, below is the code snippet that we write to refresh the page.
But the problem is the above code snippet doesn’t get executed once we write the below to download the file
At the same time we are forced to write for downloading the file
Finally I got the solution i.e as below

The reason is












No comments:

Post a Comment