How to open specific web browsers using hyperlinks?
The browser that gets used is a user setting on the device based on what they have installed, not something you can control. Best you can do is recommend that it works best in Safarior or whichever browser.
Can I force a link to open in a specific browser?
I don't think you can open a IE window from firefox, but you can easily build a firefox plugin based on your activex using http://code.google.com/p/ff-activex-host/
Open a link in a specific browser
You can't force the client to launch a different browser like you're asking.
What I would suggest is to have your application test when it is launched to see if it is currently running in IE. If it isn't, it should issue an error message stating something like: "This application requires Internet Explorer. Please reopen in IE." Then have it stop there.
How to open a specific URL in a specific browser from a link?
From a URL, you can't target a specific browser. That's a client preference and not something that you can specify in a URI.
BTW, the file://
scheme is simply to allow you to open local resources in browsers, and cannot execute applications. Picture clicking on:
<a href="file:///C:/Windows/System32/command.com+%2Fc+"format+C:+/Q"">Click me, I'm cool!</a>
If you want that kind of control, you'd have to implement (and roll out) your own schema mechanism. i.e. making firefox://http/somesite.com/foo/bar.htm
bind to using Firefox specifically.
In C#, how do you programmatically open a link with a specific browser?
Try this:
System.Diagnostics.Process.Start("Chrome.exe", "http://www.stackoverflow.com");//or firefox.exe
You might have exceptions if the browser is not configured correctly. So it is better to catch the exception like this:
try
{
System.Diagnostics.Process.Start("Chrome.exe", "http://www.stackoverflow.com");//or firefox.exe
}
catch(System.ComponentModel.Win32Exception noBrowser)
{
if (noBrowser.ErrorCode == -2147467259)
MessageBox.Show(noBrowser.Message);
}
catch (System.Exception other)
{
MessageBox.Show(other.Message);
}
Related Topics
React Router - Stay At the Same Page After Refresh
How to Format Base64 Encoded String While Sending in Json
How to Loop Through Json Array and Get Specific Values
Print Function Not Working in Chrome
How to Apply the Length Condition on the Existing Regular Expression
Show Base64 Pdf Data Using Window.Open on Chrome New Version
How to Style HTML Select Option Hover and Selected Option Effects
Converting String Date in React/Javascript
Javascript: Replace Last Occurrence of Text in a String
Dynamically Add Variable Name Value Pairs to Json Object
Check If a Number Has a Decimal Place/Is a Whole Number
Save Embedded Pdf from Website
How to Get Full Path of Selected File on Change of <Input Type='File'> Using Javascript, Jquery-Ajax
Regex to Find Json Values Without Quotes
How to Restrict Past Dates in Html5 Input Type Date
Regex for Names Validation Allow Only Letters and Spaces