A
ad
I used the codes below to send a Excel file form Web Server to client.
The file is save to client's disk after download.
How can I open the file automatically after saving it?
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
MemoryStream sm= new MemoryStream();
....
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment;
filename=Test.xls");
Response.AddHeader("Content-Length", ms.Length.ToString());
Response.ContentType = "application/excel"; //octet-stream";
Response.BinaryWrite(ms.GetBuffer());
Response.End();
The file is save to client's disk after download.
How can I open the file automatically after saving it?
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
MemoryStream sm= new MemoryStream();
....
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment;
filename=Test.xls");
Response.AddHeader("Content-Length", ms.Length.ToString());
Response.ContentType = "application/excel"; //octet-stream";
Response.BinaryWrite(ms.GetBuffer());
Response.End();