Open a URL from Windows Forms

Solution 1:

This article will walk you through it.

Short answer:

ProcessStartInfo sInfo = new ProcessStartInfo("http://mysite.com/");  
Process.Start(sInfo);

Solution 2:

using System.Diagnostics;

Process.Start("http://www.google.com/");

This approach has worked for me, but I could be missing something important.

Solution 3:

Here is the best of both worlds:

Dim sInfo As New ProcessStartInfo("http://www.mysite.com")

Try
     Process.Start(sInfo)
Catch ex As Exception
     Process.Start("iexplore.exe", sInfo.FileName)
End Try

I found that the answer provided by Blorgbeard will fail when a desktop application is run on a Windows 8 device. To Camillo's point, you should attempt to open this with the user's default browser application, but if the browswer application is not assigned, an unhandled exception will be thrown.

I am posting this as the answer since it handles the exception while still attempting to open the link in the default browser.