如何从.NET客户端应用程序加载URL

时间:2008-09-18 15:54:10

标签: c# .net windows client

使用C#和.NET框架在Windows上从胖客户端应用程序打开URL的首选方法是什么?我希望它使用默认浏览器。

4 个答案:

答案 0 :(得分:8)

以下代码肯定有效:

Process.Start("http://www.yoururl.com/Blah.aspx");

它打开默认浏览器(从技术上讲,它是处理HTTP URI的默认程序)。

答案 1 :(得分:4)

我会使用Process.Start method

Process.Start("http://www.google.com/");

答案 2 :(得分:1)

private void launchURL_Click(object sender, System.EventArgs e){
 string targetURL = "http://stackoverflow.com";
 System.Diagnostics.Process.Start(targetURL);
}

答案 3 :(得分:0)

System.Diagnostics.Process.Start("http://www.stackoverflow.com");