I have a form that has a link label that holds a website address. When the linklabel is clicked, I want to pop open a new browser window with the website. The code below causes the latest browser window (ex. hotmail) to browse to the website.
I want a new browser window to be opened.
private void llWebsite_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
{
string sLink = e.Link.LinkData.ToString();
if(sLink != null && sLink!=String.Empty)
{
sLink = sLink.ToLower().Trim();
System.Diagnostics.Process.Start(sLink);
}
}
I have also tried the following:
System.Diagnostics.ProcessStartInfo x =
new System.Diagnostics.ProcessStartInfo(sLink);
x.CreateNoWindow=true; // tried both true and false
x.UseShellExecute=true; // tried both true and false
System.Diagnostics.Process.Start(x);
Any ideas here?
Thanks