tags:

views:

292

answers:

3

How to invoke the default browser with an URL from C#?

+4  A: 
System.Diagnostics.Process.Start("http://mysite.com");
CMS
+14  A: 
System.Diagnostics.Process.Start("http://www.google.com");

More details here - http://msdn.microsoft.com/en-us/library/aa326951.aspx

Anindya
A: 

I used System.Diagnostics.Process.Start in the past, but if Firefox or another browser is set as the default this method always throws a terrible exception to users. At last, I come across System.Windows.Forms.Help.ShowHelp

Help.ShowHelp(null, "http://www.google.com");

Please notice that Help is a class only available for WinForms, which Process can be used for other cases (WebForms, WPF and so on).

Lex Li