URL Filtering in VB.Net BHO

Add-in Express™ Support Service
That's what is more important than anything else

URL Filtering in VB.Net BHO
What is the most efficient way to accomplish this? 
Alexander Desuasido




Posts: 78
Joined: 2009-04-03
Objective: I would like to be able to create a BHO that can filter the URL based on a set of criteria. I need assistance in the following areas:

1. Obtaining the URL prior to load
- What event do I execute this in?
- What Subroutine do I use to obtain the URL that is being loaded?

2. If URL is deemed inappropriate, then redirect browser to different page
- What Subroutine do I call to load browser with a new URL?

Thanks in advance intelligent people!

5
Posted 03 Apr, 2009 17:58:43 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hello Alexander,

1. You can use the following code:

 private void IEModule_BeforeNavigate2(AddinExpress.IE.ADXIEBeforeNavigate2EventArgs e)
{
   e.Url
}


2. Please take a look at the IEApp.Navigate method.

.NET, Extended MAPI, Windows Phone & RT
Posted 06 Apr, 2009 07:00:16 Top
5States 5States




Posts: 78
Joined: 2009-04-03
Just wanted to say big thanks to Eugene!

e.Url worked like a charm in BN2

Posted 08 Apr, 2009 20:23:27 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25

You are welcome!
.NET, Extended MAPI, Windows Phone & RT
Posted 09 Apr, 2009 03:48:03 Top