怎么用aspnet写个弹出保存文件的对话框?
你可以写脚本,这是我以前写的,你看看就知道了
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<SCRIPT LANGUAGE="javascript">
function SaveFile()
{
try
{
var xlswindow = window.open("","_blank","left=-1,top=-1,width=100,height=100");
xlsWindow.document.execCommand('Saveas',true,'%homeDrive%\\new_file.txt')
xlsWindow.close();
}
catch(e)
{}
}
</script>
<body>
<form>
<input type="button" value="button" onclick="SaveFile()" ID="Button1" NAME="Button1">
</form>
</body>
</html>
Copyright © 广州京杭网络科技有限公司 2005-2025 版权所有 粤ICP备16019765号
广州京杭网络科技有限公司 版权所有