Solved

How can I open a URL with the default browser?

Posted on 2007-11-16
2
188 Views
Last Modified: 2013-12-17
The title says it all.
0
Comment
Question by:EEssam
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

895 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now