avtarmori 0 Newbie Poster

We are developing web application in which we have provided force download functionality for PDF report.

We have following code to support Force Download Functionality for PDF report.

Response.AppendHeader("content-disposition", "attachment; filename=" + name);

if (type != "")
Response.ContentType = type;

Response.TransmitFile(path);
Response.End();
Response.Redirect("~/home.aspx", false);
return;


As you can see from above code that we have a line Response.End();
Our suspect it that due to this line application is ending the response of current page.


But once we successfully export file to user we have our next step is to save updated object into view state.

but as you can see that here we are ending response object in above code so our next steps which is saving of object into view state is not being performed successfully . so View state of the the page is not being updated with latest view state.

Can you suggest any other method where we can allow user for force download with out using Response.End(); (ending response object).?

Thanks in advance for your help
--------------------------------