//string fileName = "ceshi.rar";//客户端保存的文件名         //string filePath = Server.MapPath("keji.rar");//路径         //路径         string filePath = Server.MapPath("~/DownLoadFileTemp/" + this.FileUrl.Text);         string fileName = this.FileUrl.Text;

FileInfo fileInfo = new FileInfo(filePath);         Response.Clear();         Response.ClearContent();         Response.ClearHeaders();         Response.AddHeader("Content-Disposition", "attachment;filename=" + fileName);         Response.AddHeader("Content-Length", fileInfo.Length.ToString());         Response.AddHeader("Content-Transfer-Encoding", "binary");         Response.ContentType = "application/octet-stream";         Response.ContentEncoding = System.Text.Encoding.GetEncoding("gb2312");         Response.WriteFile(fileInfo.FullName);         Response.Flush();         Response.End();

rar压缩文件下载的更多相关文章

  1. C# 解压RAR压缩文件

    此方法适用于C盘windows文件夹中有WinRAR.exe文件 /// 解压文件(不带密码) RAR压缩程序 返回解压出来的文件数量 /// </summary> /// <par ...

  2. RAR压缩解压命令

    RAR压缩解压命令 这几天一直没空更新博客,现在补上: 先介绍一下rar的命令格式及相关参数含义(摘自rar): 用法:   rar <命令> -<开关 1> -<开关 ...

  3. 利用itertools生成密码字典,多线程撞库破解rar压缩文件密码

    脚本功能: 利用itertools生成密码字典(迭代器形式) 多线程并发从密码字典中取出密码进行验证 验证成功后把密码写入文件中保存 #!/usr/bin/env python # -*- codin ...

  4. 关于在linux系统环境下解压rar压缩文件

    如果在zip压缩文件,可以使有unzip来进行解压.可以直接使用yum进行下载. 但如果是rar类型压缩文件,使用yum就可能无法直接安装. 要到网址:https://www.rarlab.com/d ...

  5. C#调用RAR压缩与解压

    public void RARsave(string rarPatch, string rarFiles,string  patch,string rarName)        {          ...

  6. bat中rar压缩命令

    数据库备份,导出的dmp 文件比较大,需要压缩,压缩后大小能变为原来十分之一左右吧. 写的是批处理的语句,每天调用,自动导出dmp 文件,压缩删除原文件. 首先写下路径,先将压缩软件的路径写入系统的环 ...

  7. django 实现指定文件合并成压缩文件下载

    需求是在一列学生列表中选择指定的学生,然后下载他们上传的报告文档.

  8. rar压缩类

    using System; using System.Collections.Generic; using System.Text; using System.Diagnostics; namespa ...

  9. 关于bat中使用rar压缩命令

    数据库备份,导出的dmp 文件比较大,需要压缩,压缩后大小能变为原来十分之一左右吧. 写的是批处理的语句,每天调用,自动导出dmp 文件,压缩删除原文件. 首先写下路径 先将压缩软件的路径写入系统的环 ...

随机推荐

  1. 使用百度地图结合GPS进行定位

    本文在上文基础上加入GPS定位功能,实现实时定位,代码如下: Activity: package com.home; import android.app.Activity; import andro ...

  2. [MODx] 4. getResources

    1. Create a chunk call 'white_content' for white content: <!-- Highlights --> <div class=&q ...

  3. Android端如何获取手机当前的网络状态,比如wifi还是3G, 还是2G, 电信还是联通,还是移动

    不多说了,直接看代码, NB人会懂的! package com.example.vdisktest; import android.app.Activity; import android.conte ...

  4. C#中Strings VS. StringBuilder

    string mappingHandler = String.Format(@"""[name='BTSHTTPReceiveModule',path='BTSHTTPR ...

  5. OpenCms Application dev-ref

    OpenCms Application Overview Before undertaking development, it will be helpful to understand the ba ...

  6. OpenCMS integration with Spring MVC--reference

    ref from:http://blogs.indrajitpingale.com/?p=8 http://blog.shinetech.com/2013/04/09/integrating-spri ...

  7. C C++源代码安全分析工具调研

    C C++源代码安全分析工具调研:http://blog.csdn.net/testing_is_believing/article/details/22047107

  8. Android开发学习

    Android Studio中文社区:http://www.android-studio.org/ Android Studio官方网站地址:http://developer.android.com/ ...

  9. 那些好用的iOS开发工具

    版权说明 本文首发于<程序员>杂志 2014 年 6 月刊,未经允许,请勿转载. 前言 从 苹果发明 iPhone 起,AppStore 上的一个又一个类似 flappy bird 的一夜 ...

  10. (原创)鸟哥linux学习script shell相关笔记

    在使用鸟哥linux进行script shell学习的过程中碰到一些不太明白的知识点,在这里进行一些记录 1. [root@www scripts]# vi sh03.sh #!/bin/bash # ...