file name: abc.aspx
my code:
string Path = @"E:\documents\Data20160129110355.xls";
HttpContext.Current.Response.ContentType = "application/vnd.ms-excel";
HttpContext.Current.Response.AppendHeader("Content-Disposition", "inline; filename=Data20160129110355.xls");
HttpContext.Current.Response.TransmitFile(Path);
HttpContext.Current.Response.Flush();
HttpContext.Current.Response.Close();
On click of "Open" it will open the file successfully but the header of the file are not showing "Data20160129110355.xls". It's showing abc.aspx.
How to solve this problem please reply.