Search code examples
dotnetbrowser

Handling file being downloaded from new browser window other than current browser window


I am using Dotnetbrowser 1.11 and trying to download file on button click from a website and have assigned downloadhandler to the browser. However allowdownload event does not fire after the button click. Have noticed that on manual button click a new browser window opens and save dialog pops up. Please assist how to handle such file downloads from new browser window other than currently loaded browser window.

enter image description here


Solution

  • The download handling behavior depends on the contents of the currently loaded web page and can be different. Some websites intentionally open a popup to service a download request. Such popup ends up being blank.

    The only way to workaround this behavior is to implement a custom popup handler that will handle these cases as expected for your application.