block pop ups in window application

  • Thread starter Thread starter sonu
  • Start date Start date
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
 
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.
 
Back
Top