Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
452 views
in Technique[技术] by (71.8m points)

internet explorer - How to make WebKit or IE call your application (.NET) from HTML page opened in browser?

I have a .NET application running on windows. I want clicking on some page element (button link flash app etc) to launch my app with some special parameters. (It should run not just in IE but on WebKit based windows browsers too) During App install we suppose that user is Admin and is running Vista or Windows 7 or Later.

So my question is - Where to get examples of such interaction (WITH source of course)?

So how to make WebKit based Browser or IE call your .Net application?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Register a custom URL Protocol Handler. Then you can specify the url using links, etc:

<a href="myapp://doSomething/>Click to run my app!</a>


I can confirm that this works in all versions of Internet Explorer. I've also tested it in the latest versions of Firefox (3.6) and Chrome (whose version escapes me). Chrome will not allow you to enter a custom protocol into the address bar, but it will launch applications from links using custom protocols.

If you have Adobe Reader installed, the acrobat:// protocol is registered. Unfortunately, SO doesn't allow links using custom protocols, so I can't add an example here I'm afraid.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...