问题
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.
回答1:
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).
回答2:
I'd use the Process.Start method.
Process.Start("http://www.google.com/");
回答3:
private void launchURL_Click(object sender, System.EventArgs e){
string targetURL = "http://stackoverflow.com";
System.Diagnostics.Process.Start(targetURL);
}
回答4:
System.Diagnostics.Process.Start("http://www.stackoverflow.com");
来源:https://stackoverflow.com/questions/93832/how-does-one-load-a-url-from-a-net-client-application