Hi everyone,
I have a working DNN7.4 site. After upgrading to DNN9, the file export function stops working. The code:
HttpContext.Current.Response.ContentType = "text/csv";
String Header = "Attachment; Filename=" + Path.GetFileName(filePath);
HttpContext.Current.Response.AppendHeader("Content-Disposition", Header);
System.IO.FileInfo Dfile = new System.IO.FileInfo(filePath);
HttpContext.Current.Response.WriteFile(Dfile.FullName);
HttpContext.Current.Response.End();
Now when I click on the button to download CSV file, the code just runs thought with no error, but nothing happens on the client browser.
Do you happen to experience the same problem and how to fix it?
Thanks so much