在C#中如何用按钮实行链接网页!

来源:百度知道 编辑:UC知道 时间:2024/06/17 18:03:45
在C#控制台按钮事件来链接到网页。有知道的谢谢!回答下

c#控制应用程序 不能加BUTTON按钮
你应该是web应用程序或是windows程序吧
private void Button_Click(object sender, System.EventArgs e)
{
//页面连接
Response.Redirect("网址");
}

新线程启动IE
static void Main()
{
System.Threading.Thread th = new System.Threading.Thread(new System.Threading.ThreadStart(F));
th.Start();
}

public static void F()
{
System.Diagnostics.Process.Start("iexplore.exe", "www.hao123.com");
}

在按钮事件中添加这样一行就可以

Response.Redirect("网址"); 是控制台啊,没有看清吧,你那是网页。

应该这样的吧/
/打开网页

System.Diagnostics.Process.Start(@"http://hi.baidu.com");

Response.Redirect(URL);

在按钮事件中添加这样一行就可以

Res