Open a URL in the Default Browser in Your .NET Application

Virtually every application these days requires at least some connection to the internet. Letting the user click a link and open it in their browser is essential. This recipe shows you the 1 line method of doing so.


This is the absolute simplest way to launch a URL in a .NET application:
System.Diagnostics.Process.Start("http://www.tech-recipes.com");

Just put this code in the click event for your control, and replace the URL in the sample code with your URL.

The Conversation

Follow the reactions below and share your own thoughts.

6 Responses to “Open a URL in the Default Browser in Your .NET Application”

  1. June 11, 2009 at 11:30 pm, moises said:

    thanks!!

    Reply

  2. May 30, 2010 at 2:41 am, Anonymous said:

    Awesome, thanks for this!

    Reply

  3. December 27, 2010 at 2:10 pm, mohammad said:

    thanks v.v.v.v.v.v.v.v.thanks

    Reply

  4. March 11, 2011 at 8:15 am, ronnie said:

    is possible to pass post data in opening web browser?

    Reply

  5. June 10, 2012 at 10:46 am, madhab kumar said:

    I love my eyes when U look into them,
    I love my name when U say it, from- madhab kumar , sana aryapalli

    Reply

  6. April 06, 2013 at 11:33 pm, Sau Hi said:

    How can I open a link with chosen browser. EX: Open link with Firefox but my default browser on computer is IE?

    Reply

Leave a Reply