0


I'm using WebBrowser control to allow user navigate to intranet web-portal and keep user in c# desktop application. In some cases user can clicks on link on html-page and child window with WebBrowser control opens(to do that, I subscribed to NewWindow event on parent WebBrowser control).
There is "Close" button on child window's page. It like like that:
<input type="button" name="closeButton" onclick="window.close()">
When user clicks on this button window with parent BrowserControl closes(without rising close/closing events) and child window becomes hanging.

But if we do same steps in IE6 - everything works fine.
Any propositions?
Thanks in advance.

alex.b
  • 4,547
  • 1
  • 31
  • 52

1 Answers1

0

Well, problem was solved, but in a bit dirty way: after opening popup window I find "closeButton" and erase code in its "onclick" event and then I attach event handler to "onclick" event(api allows to do that), which contains code, that closes popup window through winforms api manually;

alex.b
  • 4,547
  • 1
  • 31
  • 52
  • What's more, I've found great solution on Mauricio Rojas Blog http://blogs.artinsoft.net/mrojas/archive/2009/05/21/webbrowser-control-and-window-close.aspx . It solved all problems. – alex.b Oct 07 '10 at 22:47