I have a link that goes into a web class and retrieves a file from a database.
As far as the user is concerned this is a direct file link and I want to offer them a download dialog box with the "open from current location" or "save as" options.
If the user chooses "open from current location" I want it to open it in the associated application or offer the "open with" dialog, if the file type has no association.
Or if the user chooses "save as" I want them to be offered the standard windows "save as" dialog window, but with my specified file name as the default.
I have tried passing various information in http header, but it either opens the file in the current window if the application can open in a browser or brings up the download dialog 2 or 3 times.
I have tried setting the content disposition to "attachment; filename=myfile.ext" and setting content type to either "mimetype/subtype" or "application/octet-stream", both of which I would expect to force windows to look for associated applications.
Can anyone help with this as it's sending me barmy with it's inconsistent or unrequired results!
Thanks,
Gary