|
Rank: Advanced Member Groups: Member
Joined: 1/12/2015 Posts: 81
|
I am loading an HTML file into a WebView and it's automatically prompting to download a SWF file. Is there any way in the latest version to disable the prompt and not even initiate the download at all? Or at least a way to cancel the download after it starts?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi, Yes. You can cancel the download through BeginDownload event: https://www.essentialobjects.com/doc/webbrowser/customize/download.aspxIf you need to cancel the download, you would need to call DownloadItem.Cancel method to cancel the download. Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 1/12/2015 Posts: 81
|
Thank you for your reply. I tried that but when I run multiple applications (each with one engine) on similar HTML files, I'm still occasionally getting prompted with the download dialog.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi, We are not aware of any problem about this feature. If you continue to have problem, please try to isolate the problem into a test project and send the test project to us. See here for more details: https://www.essentialobjects.com/forum/test_project.aspxWe will be happy to investigate further as soon as we have that. Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 1/12/2015 Posts: 81
|
I was able to stop the download by putting these two lines in the BeforeDownload handler:
Code: C#
e.Item.Cancel();
e.ShowDialog = false;
and putting this line again in the DownloadUpdated handler:
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Ah. Thanks for sharing!
|
|