Web Browser File Association

G

Guest

With a WinForms app I know how to configure the registry to understand a
specific file association so that it is associated with a given application.

But how does one do this with a web browser?

Say that one creates a new file type called ".abc". If the user clicks on a
".abc" file on a web page, how does one tell both Internet Explorer and
Mozilla Firefox to utilize a specific WinForms app if the user chooses "Open"?
 
Joined
Feb 4, 2010
Messages
28
Reaction score
0
You are forgetting a very important thing: Web applications cannot
access the registry on the client's computer. Desktop applications can
do that because they are running on the client's computer already and
have access to *all* the resources on the computer. The only way you
can create the associations you want is either:

Option 1
When your user downloads the file, and they try to open it, Windows
brings the unknown file type thing and asks the user to select an
application with which to open the file. Your user then selects the
application they want and clicks on 'always use this application to
open files of this type' or something like that. This is all obviously
totally out of your own control.

Option 2
You can distribute a small desktop application which creates and
registers the file type '.abc'. can even be an ActiveX control on your
web pages. but this is not desirable.

hope this helps
 
G

Guest

Okay, maybe I didn't ask the right question. The filetype I've constructed
is actually just an XML file with a different file extension. When I load a
sample on my website and let the user click on it, what happens is that the
XML file itself appears like a text file, rather than letting the user Open
or Save it.

How can I change this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top