Trouble with Forms.WebBrowser

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

kay, here it`s my problem. i have a TreeView and a WebBroswer, when i choose
something on the treeview, the program generates an html, and it is showed on
the webbroswer, but the html has links to other classes that are displayed on
the treeview. How can i "cath" the link clicked event to choose how will be
the next webpage generated by my program?

It's just client side, has no servers at all.
 
Tomaz,

I would attach to the WebBrowserNavigating event and cancel the event
before the click takes place. In the event handler, the
WebBrowserNavigatingEventArgs passed in contains the URL navigated to, in
the Url property.

You might also have to have a flag that is set when you call Navigate
from your treeview being picked. If the flag is set, you don't want to
cancel the navigation (since the event will be fired when you call
Navigate).

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top