Solved

How can I open a URL with the default browser?

Posted on 2007-11-16
2
213 Views
Last Modified: 2013-12-17
The title says it all.
0
Comment
Question by:EEssam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 16

Accepted Solution

by:
McExp earned 350 total points
ID: 20301697
The following code works for me, it is the click event of a button handler, when the button is clicked the browser is loaded.

private void Button1_Click(Object sender, EventArgs e)
{
Process.Start("http://www.experts-exchange.com/Microsoft/Development/.NET/.NET_Framework_2.0/Q__22966731.html");
}
0
 
LVL 55

Assisted Solution

by:Jaime Olivares
Jaime Olivares earned 150 total points
ID: 20301734
Process.Start can cause an exception, use a try/catch block

    string url= "http://www.google.com";
    try
        {
         System.Diagnostics.Process.Start(url);
        }
   catch
        {
             // do something
        }
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question