This is what I do:
// see if s/b downloaded rather than viewed
if( download )
{
Response.AddHeader("Content-Disposition",
"attachment; filename=\"" + theDocument.OriginalFileName + "\"" );
}
// make the reposnse
Response.Clear();
Response.ContentType = theDocument.FileType;
Response.Flush();
Response.WriteFile(theDocument.StoredFilePath);
Response.End();
'download' is a boolean extracted from the query string. Setting the
Content_Disposition and attachment is sufficient to cause the download
save as dialog to open (in IE6 anyway), otherwise it will attempt to
view it in IE6, if no viewer is found in will then download anyway.
HTH
Charles
"Elrey Ronald V." <lu*******@hotmail.com> wrote in message
news:42**************************@posting.google.c om...
I need to download a file like MS Word doc
from a web form without viewing it. Something
that goes directly to the 'Save As' dialog.
Right now the browser takes over the displays
the document.
Is this possible?
TIA
lu*******@hotmail.com