应该如何实现?
解决方案 »
- WndProcHooker
- 不好意思...还是TEXTBOX中显示16进数的问题...,
- 请问大家一个简单的问题,如何在一个函数中调用另一个函数中生成的类的实例?
- 弹出窗体如何显示在父窗体上
- 一个小问题 希望能得到大家的帮助
- zglxh3(noproblem),接分之二
- 请各位大侠们帮我解决DataTable的一个问题
- 如何实现对(AUTO CAD)DWG文件的显示/操作和报表打印???在线等待??
- 倾听高手的指教 ! 如果以.net做为开发平台,需要设置应用服务器该如何搭建 !!!
- 微软刚刚向法院上交了WINXP的源代码。WINXP竟然是用BASIC语言写的!
- 怎么把连接数据库的绝对地址改成相对地址
- 弱智问题在线等:我要设置窗体的透明度,%号如何输入
{
textBox1.Text = "Zswang 路过";
Process.Start(string.Format("http://www.baidu.com/baidu?wd={0}&cl=3",
textBox1.Text));
}
using System.Diagnostics;private void button1_Click(object sender, EventArgs e)
{
if(textBox1.Text!="")
Process.Start(string.Format("http://www.baidu.com/baidu?wd={0}&cl=3", textBox1.Text));
}
Process.Start应用在WinForm,顾名思义:启动一个进程
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /></div>
</form>
</body>
</html>
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Diagnostics;public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
if (TextBox1.Text != "")
Process.Start(string.Format("http://www.baidu.com/baidu?wd={0}&cl=3", TextBox1.Text));
}
}
输入数据后点按钮没反映,把 if (TextBox1.Text != "") 去掉也一样,这是为什么呢?