Web Browser Help - getting the URL of a clicked link?
Matt
Matt
Hi,
you could use the Navigating event to catch user click on the link (not the same thing, but close)...:
private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e)Setting e.Cancel to true will cancel the navigation and the url won't change...
The above CheckForSpecificUrl method would return true, if the clicked link has to open in a new tab (you can test the url address for some patterns and decide, which urls you want to let navigate in the same window and which not. OpenNewTab method should create a new tab, containing a new WebBrowser control.
Hope this helps,
Andrej