Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 19, 2012 09:31 PM by threeo
Star
13403 Points
2531 Posts
Dec 19, 2012 08:23 PM|LINK
Try cleaning your internet download temporary folder. You probably have an old download sitting in it.
Participant
1156 Points
539 Posts
Dec 19, 2012 08:29 PM|LINK
you are correct.
the first problem was fixed by doing the following:
in the following code, "filenamewithoutpath" was previously the filename WITH the path. removing the path at line 3 corrected the problem
HttpContext.Current.Response.Clear(); HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"; HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + filenamewithoutpath); HttpContext.Current.Response.WriteFile(filename); HttpContext.Current.Response.Flush(); HttpContext.Current.Response.End();
Dec 19, 2012 09:31 PM|LINK
it's not there. also....i append the datetime to the file names so there should never be a duplicate
Paul Linton
Star
13403 Points
2531 Posts
Re: how to handle file path when doing an Excel download??
Dec 19, 2012 08:23 PM|LINK
Try cleaning your internet download temporary folder. You probably have an old download sitting in it.
threeo
Participant
1156 Points
539 Posts
Re: how to handle file path when doing an Excel download??
Dec 19, 2012 08:29 PM|LINK
you are correct.
the first problem was fixed by doing the following:
in the following code, "filenamewithoutpath" was previously the filename WITH the path. removing the path at line 3 corrected the problem
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.ContentType = "application/vnd.ms-excel";
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + filenamewithoutpath);
HttpContext.Current.Response.WriteFile(filename);
HttpContext.Current.Response.Flush();
HttpContext.Current.Response.End();
threeo
Participant
1156 Points
539 Posts
Re: how to handle file path when doing an Excel download??
Dec 19, 2012 09:31 PM|LINK
it's not there. also....i append the datetime to the file names so there should never be a duplicate