T
T
TechNOIR2018-02-14 00:39:04
C++ / C#
TechNOIR, 2018-02-14 00:39:04

C#. webbrowser. How to intercept the transition by the link?

Good afternoon.
Can you please tell me how you can intercept the transition by a link in the WebBrowser element?
Property Navigating (If yes, then please show a simple example of the condition, I can not find something suitable in any way).
I need to make a simple condition, for example:
By clicking on any link, we intercept the transition. If the link contains any word, then go. If not, then no)
Any ideas, fellow experts?)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
stevedamrin, 2018-02-14
@stevedamrin

Perhaps this will be useful to you. I'm not an expert in this matter, maybe I'm wrong
https://social.msdn.microsoft.com/Forums/vstudio/e...

D
Dmitry Bashinsky, 2018-02-14
@BashkaMen

Subscribe to the Navigating event and there is a link in the parameters (e.Url like here). Further check

if (ссылка не подходит)
    e.Cancel = true;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question