在asp.net中保存文件对话框 [英] save file dialogue in asp.net

查看:98
本文介绍了在asp.net中保存文件对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,所有如何访问asp.net中的保存文件对话框

Hi all how to access save file dialogue box in asp.net

推荐答案

String FileName = "FileName.txt";
String FilePath = "C:/...."; //Replace this
System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
response.ClearContent();
response.Clear();
response.ContentType = "text/plain";
response.AddHeader("Content-Disposition", "attachment; filename=" + FileName + ";");
response.TransmitFile(FilePath);
response.Flush();
response.End();


了解基本概念请参阅这两个链接

[ ^ ]
http://msdn.microsoft.com/en-us/library/sfezx97z%28v = vs.85%29.aspx [ ^ ]

该链接将清除您对保存文件对话框的所有疑问;)
for basic concepts refer these 2 links

[^]
http://msdn.microsoft.com/en-us/library/sfezx97z%28v=vs.85%29.aspx[^]

this link will clear your all doubts about save file dialog ;)


请参见
http://support.microsoft. com/default.aspx?scid = KB; EN-US; q306654& ID = KB; EN-US; q306654& lex [ http://aspalliance.com/259 [ ^ ]
See
http://support.microsoft.com/default.aspx?scid=KB;EN-US;q306654&ID=KB;EN-US;q306654&lex[^]
http://aspalliance.com/259[^]


这篇关于在asp.net中保存文件对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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