Welcome Guest Search | Active Topics | Sign In | Register

Download File Options
VIctor Peres
Posted: Monday, June 24, 2019 9:25:26 AM
Rank: Member
Groups: Member

Joined: 6/17/2018
Posts: 13
Hello everybody.

I'm using the Browser. On the page there is a button. This button opens a new page that downloads directly to the browser downloads folder without triggering the FILEDIALOG method. The new page opens a few seconds and then closes and the file is downloaded without triggering FILEDIALOG.

The new page fires only the NEWWINDOW method.

I need help getting and downloading this file that has been downloaded.

Many thanks,

Cya
eo_support
Posted: Monday, June 24, 2019 9:29:19 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,066
Hi,

Please see if this helps:

https://www.essentialobjects.com/doc/webbrowser/customize/download.aspx

All downloads should trigger BeforeDownload/DownloadUpdated/DownloadCompleted events.

It should also trigger FileDialog event unless you explicitly supressed it in your BeforeDownload event handler. So you might already be handling those events without knowing it.

Thanks!
VIctor Peres
Posted: Monday, June 24, 2019 9:37:28 AM
Rank: Member
Groups: Member

Joined: 6/17/2018
Posts: 13
Please help me ... page A calls the B page with target="_blank" (executing NEWWINDOW method) and page B that downloads the file. How do I do hook method BEFOREDOWNLOAD / DOWNLOADUPDATE from page B?
eo_support
Posted: Monday, June 24, 2019 9:48:06 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,066
You just hook up your event handler to the new WebView object passed to you through e.WebView in your NewWindow handler.
VIctor Peres
Posted: Tuesday, June 25, 2019 1:46:08 PM
Rank: Member
Groups: Member

Joined: 6/17/2018
Posts: 13
Honestly, I could not understand anything. The example that comes in the package is in WPF and I'm working with WIndows Forms. Still not working! When I try to set the new webview that was created, the page freezes and does nothing
eo_support
Posted: Tuesday, June 25, 2019 2:15:57 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,066
The WPF related code has nothing to do with you. Your focus should be handling WebView related event, and that part has nothing to do with WPF. So you can just ignore all the WPF related code. In your case, we asked you to hook up your event handler to the new WebView object in your NewWindow handler. This is completely unrelated to WPF at all. If you have trouble identify or understand this part of the code, then we are not sure how we can help you further. It's just plain .NET code.

This topic gives you more detailed explanation of the platform neutral aspect of the core components:

https://www.essentialobjects.com/doc/webbrowser/start/sample.aspx

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.