What is the preferred way to open a URL from a thick client application on Windows using C# and the .NET framework? I want it to use the default browser.
+4
A:
I'd use the Process.Start method.
Process.Start("http://www.google.com/");
Mudu
2008-09-18 15:56:38
+1
A:
private void launchURL_Click(object sender, System.EventArgs e){
string targetURL = "http://stackoverflow.com";
System.Diagnostics.Process.Start(targetURL);
}
Martin
2008-09-18 15:57:04
+6
A:
The following code surely works:
Process.Start("http://www.yoururl.com/Blah.aspx");
It opens the default browser (technically, the default program that handles HTTP URIs).
Dario Solera
2008-09-18 15:57:41