How to open a web page from my application?

For desktop versions of .NET:

System.Diagnostics.Process.Start("http://www.webpage.com");

For .NET Core, the default for ProcessStartInfo.UseShellExecute has changed from true to false, and so you have to explicitly set it to true for this to work:

System.Diagnostics.Process.Start(new ProcessStartInfo
    {
        FileName = "http://www.webpage.com",
        UseShellExecute = true
    });

To further complicate matters, this property cannot be set to true for UWP apps (so none of these solutions are usable for UWP).

Leave a Comment