从网页保存时,禁止保存/打开对话框 [英] Suppress save/open dialogbox when saving from webpage
问题描述
大家好,
我们需要动态地从网页下载文件。
使用href创建文件:javascript:_doPostback链接...没有可用于此的直接URL。
我需要禁止保存/打开对话框并保存文件,以便系统可以继续没有人工干预的导入。
我尝试了几个代码周围,但没有帮助。
任何建议/想法请。
谢谢
Daniele
我的尝试:
我尝试过标准的WebRequest / WebResponse方法,但其他方法都需要特定的URL。
Hi Guys,
we need to download a file from a webpage dynamically.
the file is being created using a "href:javascript:_doPostback" link ... there is no direct URL that can be used for this.
I need to suppress the save/open dialog box and just save the file so the system can proceed with the import without manual intervention.
I've tried several codes found "around" but none helped.
Any suggestions/ideas please.
Thank you
Daniele
What I have tried:
I've tried the standard WebRequest/WebResponse methods and other but all require a specific URL.
推荐答案
你出于安全原因,不能这样做。你想要一个网站在你不知道的情况下在你的系统上保存文件吗?即使有可能你怎么知道在哪里保存它?
放弃这个想法,这根本不可能。
You can't do this for security reasons. Would you want a website saving files on your system without you knowing? And even if it was possible how would you know where to save it?
Abandon this idea, it's simply not possible.
这篇关于从网页保存时,禁止保存/打开对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!