473,785 Members | 2,369 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trouble with Forms.WebBrowse r

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.

Apr 6 '06 #1
1 1280
Tomaz,

I would attach to the WebBrowserNavig ating event and cancel the event
before the click takes place. In the event handler, the
WebBrowserNavig atingEventArgs 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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Tomaz Canabrava" <Tomaz Ca*******@discu ssions.microsof t.com> wrote in
message news:B6******** *************** ***********@mic rosoft.com...
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.

Apr 6 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1858
by: daniel.manges | last post by:
I need to use a Windows.Forms.WebBrowser in a separate thread. (I'm not using the GUI, I just want to navigate to a page and get the ..Document.Body.InnerText property of the WebBrowser - maybe there is another way to do this?). To make the instance, I set the thread to run in STA mode. However, the DocumentCompleted event never gets called. It works fine if I don't using threading, but in multi-threading, the event for...
1
6311
by: Eggy | last post by:
Hi. I have an application that should download files from internet. The problem is the protocol is HTTPS. So I have a System.Windows.Forms.WebBrowser which allows the user to log in to the HTTPS webpage with username and password. The login is working since I can look at the files (XML-files) by navigating to them(see the XML in them), which should be possible if the user is not logged in. So figure the WebBrowser object now have a...
2
6670
by: Qiang | last post by:
Hi, Anybody knows how to convert an instance of SHDocVw.WebBrowser to System.Windows.Forms.WebBrowser? Or is it possible? thanks, Qiang
1
5170
by: Joe | last post by:
HI Trying to figure out the difference between these 2 browser I am embedding a MS office Document (Word/Excel) in a WebBrowser on a Form With AxSHDocVw I can do the following to save the current document object o = new object(); axWebBrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_SAVE,SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER, ref o, ref o);
0
3266
by: =?Utf-8?B?Q29kZVJhem9y?= | last post by:
I am converting a windows application which contains a web browser control into an ASP.net application. The Windows project references all manner of html controls in the WebBrowser control and retrieves values using the HtmlControlCollection class etc. I was hoping I was going to be able to work with the Windows.Forms.WebBrowser object from inside my ASP.net webform by simply adding a reference to System.Windows.Forms and doing code...
0
9481
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10341
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10155
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8979
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7502
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5383
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2881
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.