Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I open alternative webbrowser (Mozilla or Firefox) and show the specific url?

Tags:

browser

c#

.net

I know there is built-in Internet explorer, but what I'm looking for is to open Firefox/Mozilla window (run the application) with specified URL. Anyone can tell me how to do that in C# (.nET) ?

like image 893
Skuta Avatar asked Oct 21 '08 19:10

Skuta


People also ask

How do I get Firefox to open a specific URL?

Chosen solution To achieve this you need to make copies of the Firefox desktop shortcut and add the URL to the target line after the path to the Firefox program. Leave a space before the URL. See also: https://developer.mozilla.org/Command_Line_Options.

What is Firefox browser URL?

https://www.mozilla.org/en-US/firefox/all/

How do I open an unsecure website in Firefox?

Look for the small gray shield icon in the extreme right-hand corner of the address bar. Click the "Load unsafe script" link. You will be taken back to the entry page of your course; navigate back to the page with the embedded video.


3 Answers

You can do this:

System.Diagnostics.Process.Start("firefox.exe", "http://www.google.com");
like image 72
Bruno Le Duic Avatar answered Sep 29 '22 13:09

Bruno Le Duic


This will launch the system defined default browser:

string url = "http://stackoverflow.com/";
System.Diagnostics.Process.Start(url); 

Remember that Process.Start(url) might throw exceptions if the browser is not configured correctly.

like image 43
3 revs, 2 users 89% Avatar answered Sep 29 '22 12:09

3 revs, 2 users 89%


See ProcessInfo.UseShellExecute

like image 38
Ilya Ryzhenkov Avatar answered Sep 29 '22 12:09

Ilya Ryzhenkov