I have to redirect to the same page after a file download !
when i say response.redirect .. it says Cannot redirect after HTTP headers have been sent
can some one help me with this?
i am zipping a file using ionic.zip and downloading it.
PS : Let me know if i have to make my question more clear i can explain :(
Response.Clear();
Response.BufferOutput = false;
string filename = "results" + ".zip";
Response.ContentType = "application/zip";
Response.AddHeader("content-disposition", "filename=" + filename);
using (ZipFile zip = new ZipFile())
{
zip.AddDirectory(pathhdf.Value);
zip.Save(Response.OutputStream);
}
Response.Close();
Response.Redirect("Default.aspx"); /// here come my error
Thanks in advance!