I'm downloading a file with Response.WriteFile
and appending a timestamp to the filename in order to prevent IE from caching the downloaded file. But the browser is changing ?
to _
.
string filePath = Server.MapPath("~/test.docx");
string fileName = string.Concat("test.docx", "?t=", DateTime.Now.Ticks);
Response.ContentType = "application/octet-stream";
Response.AddHeader("content-disposition", "attachment; filename=" + fileName);
Response.WriteFile(filePath);
...
Expected result: test.docx
Actual result: test.docx_t=635823369853307954
Is this possible?