Hi,
You can't tell the browser how to react to content, so to some extent
your hands are tied. You also can't tell the browser to launch an
application. You can only really tell the browser what type of content
you are sending.
If you are writing bytes to the output stream then the following maybe
of interest:
Response.Clear();
Response.ContentType = "application/msword";
Response.AddHeader(("Content-Disposition","attachment;filename=whatever.doc"));
Response.BinaryWrite(filedata);
I find this usually presents the user with a file open or save to disk
dialog. Open will usually result in the MS Office app. being opened with
the doc.
mnichols
EoRaptor013 wrote:
> Couldn't figure out the search that would turn this answer up...
>
> Building a company intranet web site. Need a way to click on a link,
> button, whatever, on the web page and thereby launch Word or Excel with
> a passed DOC or XLS file. So, on a given page, there's a hotspot to
> click on that downloads a formatted DOC or XLS to the user's machine
> and launches the appropriate application.
>
> Interestingly, for me, somehow the web site was set up so that clicking
> on a "traditional" file link opens the document or XLS in the browser
> but not in the separate external application. Don't know what to do
> about that but that's a different problem (right?).
>
> Any ideas would be appreciated.
>
> Randy
>
|