0

Hello there,,,,,,,

In my project there is one window form and on that form I have one linkLabel control.....

Now my question is that I want to add one web page into my project ......so that when I click on the

LinkLabel it must open that web page .....so how can I do it

5
Contributors
4
Replies
23
Views
4 Years
Discussion Span
Last Post by YA RAMSAMKER
0

So you want the Link Label to point to a page not created by you? If that's the case you can use something like this System.Diagnostics.Process.Start("http://WebsiteName");inside the onClick method

Edited by Fenrir()

0

Add a "WebBrowser" control to your current form (or create a second form and add it to that form). Then use "Navigate". Change the "Dock" and "Anchor" properties of the WebBrowser control as needed to fit properly and resize properly on your form.

Call webBrowser1.Navigate("myurl.com") in the "LinkClicked" event (of your LinkLabel control).

private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
     webBrowser1.Visible = true;
     webBrowser1.Navigate("http://myUrl.com");

}

Edited by cgeier

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.