如何对文件进行编码以进行下载 [英] how to code a file for downloading

查看:97
本文介绍了如何对文件进行编码以进行下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Visual Studio 2008上编码文件,当您单击该文件的链接时,会弹出一个下载对话框,您实际上可以将其保存在本地驱动器上.

How can I code a file on Visual Studio 2008 that when you click on its link, a download dialog box pops up and you can actually save it on your local drive.

推荐答案

通过下面的链接..,

在ASP.NET中下载文件并跟踪下载成功/失败的状态 [ Google [
Go through the below link..,

File Download in ASP.NET and Tracking the Status of Success/Failure of Download[^]

There are so many examples available on Net , a simple google search solve you problem.

see this ...

Google[^]


这些可能对您有所帮助

以asp下载pdf,word,文本文件.净 [ ^ ]

在asp.net中下载文件 [如何下载在asp.net中具有路径的文件 [
These may help you

Download pdf,word,text file in asp.net[^]

File download in asp.net[^]

How to Download a file with a path in asp.net[^]

There are so many examples available on Net , a simple google search solve you problem.


string strFilePath = "./downloads/filename.txt";
               Response.AppendHeader("Content-Disposition", "attachment; filename=" + strFilePath);
               Response.WriteFile(strFilePath);
               Response.End();


这篇关于如何对文件进行编码以进行下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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