How do I start a process, such as launching a URL when the user clicks a button?
Include the using System.Diagnostics;
.
And then call this Process.Start("Paste your URL string here!");
Try something like this:
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Diagnostics;
namespace btnproce
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
string t ="Balotelli";
Process.Start("http://google.com/search?q=" + t);
}
}
}
Please note that it is a sample ASP.NET page as an example. You should try and improvise a little bit.