invoking download dialog box upon clicking on a link

Hi,

I am preparing one html file which contains link to trx files (test results file generated by VSTT). These trx files are present on a local share. When I click on the link I want either to open the file in the devenv or pop up the dialog box to download the file. Currently file is getting opened in IE only as a XML file which I don't want.

I am more interested in first option: "That is by default file gets opened in devenv after user clicked on the link."

How can I do it?

-Aaryan

[530 byte] By [Aaryant] at [2008-2-22]
# 1

Hi Aaryan,

Can you provide more details as to what the file is and how you are making is available? A pointer to a repro case woudl help.

Thanks
-Dave

DaveMassy at 2007-8-31 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Web Development...
# 2

Dave,

I am using VSTT to tun some tests. It gives me one Test Result File (extension .trx) as output. I am preparing a html report which contain various piece of information useful for testers. I am also giving link to Test Result File location in thar report. Now when a tester clicks on that link then I want devenv to be opened and load that Test Result File(.trx) or atleast pop up a download box so that tester can save it to his disk and then open it with devenv. Currently after clicking the link file is getting opened in IE only which is not in a readable format. I want to avoid this.

-Aaryan

Aaryant at 2007-8-31 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Web Development...
# 3

Hi Aaryan,

It sounds like the format is XML so IE will recognise that mimetype and try to open it as XML. If you register the filename extension for .trx for devenv to open then it should use that application.

Thanks
-Dave

DaveMassy at 2007-8-31 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Web Development...