Skip to main content
include .NET Core info here, rather than making readers scroll to other answers
Source Link
Peter Duniho
  • 71k
  • 7
  • 113
  • 149
System.Diagnostics.Process.Start("http://www.webpage.com"); 

OneFor desktop versions of many ways.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 EDIT: Apparently 12 years later, this answer is not valid for the most current versions of the .NET Framework or .NET Core. See other answers for current solutions.cannot be set to true for UWP apps (so none of these solutions are usable for UWP).

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

One of many ways.

EDIT: Apparently 12 years later, this answer is not valid for the most current versions of the .NET Framework or .NET Core. See other answers for current solutions.

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).

added 168 characters in body
Source Link
Inisheer
  • 20.9k
  • 9
  • 55
  • 83
System.Diagnostics.Process.Start("http://www.webpage.com"); 

One of many ways.

EDIT: Apparently 12 years later, this answer is not valid for the most current versions of the .NET Framework or .NET Core. See other answers for current solutions.

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

One of many ways.

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

One of many ways.

EDIT: Apparently 12 years later, this answer is not valid for the most current versions of the .NET Framework or .NET Core. See other answers for current solutions.

Source Link
Inisheer
  • 20.9k
  • 9
  • 55
  • 83

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

One of many ways.