想要使用“打开并保存"按钮打开一个窗口以下载文件 [英] want to open a window with open and save button to download a file

查看:69
本文介绍了想要使用“打开并保存"按钮打开一个窗口以下载文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


当我尝试运行此代码时,文件会自动打开和关闭.但是我的要求是它必须问我一个打开,保存,取消按钮的弹出窗口来下载文件.


when i am trying to run this code the file opening and closing automatically. but my requirement is that it has to ask me with a popup window of open,save,cancel buttons to downlaod file.

<html>
<head>
<script language="JavaScript">
function callhere(){
window.open("C:/Downloads/LoginNames.csv");
}
</script>
</head>
<body onload="callhere()">
</body>
</html>



谢谢
Amala



thanks
Amala

推荐答案

您应在应用程序中创建一个子表单.此子窗体应包含文件上载控件和所需的按钮.在window.open调用中调用此页面,然后在子表单的代码隐藏中处理上传本身.
You should create a subform in your application. This subform should contain a file upload control and the buttons you require. Call this page in your window.open call and then in the code-behind for your subform handle the upload itself.


这篇关于想要使用“打开并保存"按钮打开一个窗口以下载文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆