"Albano Alves" <al**********@vpconsulting.pt> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
How can I force the file download, for example a .doc?
I don't want to open with IE.
Response.Clear();
objFileInfo = new FileInfo(strFile); // fully-qualified filespec
Response.AddHeader("Content-Disposition", "attachment; filename=" +
objFileInfo.Name);
Response.AddHeader("Content-Length", objFileInfo.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.WriteFile(objFileInfo.FullName);