On Nov 14, 11:45 am, Colby Africa <colby.afr...@gmail.comwrote:
Here is a snippet I use to transmit an Excel file to the client:
Response.ContentType = "application/vnd.ms-excel";
Response.ContentEncoding = System.Text.Encoding.Default;
Response.AppendHeader("Content-Disposition", @"attachment; filename="
+ Path.GetFileName(filePath));
Response.TransmitFile(filePath);
Hope this helps.
Colbyhttp://colbyafrica.blogspot.com
Thank you very much! Using your code as a starting point I did a
little searching and came up with the following:
//---Send the file to the client
Response.Buffer = true;
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "text/plain";
Response.AddHeader("Content-Disposition", @"attachment;
filename=" +
Path.GetFileName(reportFilename));
Response.TransmitFile(reportFilename);
Response.End();
I am very grateful that there are selfless, generous people like you
in the world. Thanks again for the help.
Dave Couture