block pop ups in window application

S

sonu

I am developing a window application, where i open a web page on a
click event.

but problem is all pop ups also opened when i open that page.
is there any way to block pop ups without adjusting browser settings.

can we block pop ups through code.

Amit
 
N

Nicholas Paldino [.NET/C# MVP]

Amit,

If the browser you are opening is internet explorer, then you should
open it through automation. Then, you need to attach to the NewWindow event
for the webbrowser. In that event, you can cancel the creation of the new
window if it does not meet your criteria.

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

Top