易截截图软件、单文件、免安装、纯绿色、仅160KB

ASP.NET 檔案下載

//TransmitFile实现下载
    protected void Button1_Click(object sender, EventArgs e)
    {
        /*
        微软为Response对象提供了一个新的方法TransmitFile来解决使用Response.BinaryWrite
        下载超过400mb的文件时导致Aspnet_wp.exe进程回收而无法成功下载的问题。
        代码如下:
        */
        Response.ContentType = "application/x-zip-compressed";
        Response.AddHeader("Content-Disposition", "attachment;filename=z.zip");
        string filename = Server.MapPath("DownLoad/z.zip");
        Response.TransmitFile(filename);
    }
    //WriteFile实现下载
    protected void Button2_Click(object sender, EventArgs e)
    {
        /*
        using System.IO;
        */
        string fileName = "asd.txt";//客户端保存的文件名
        string filePath = Server.MapPath("DownLoad/aaa.txt");//路径
        FileInfo fileInfo = new FileInfo(filePath);
        Response.Clear();
        Response.ClearContent();
        Response.ClearHeaders();
        Response.AddHeader("Content-Disposition", "attachment;filename=" + fileName);
     


相关文档:

Jquey Ajax访问asp.net后台代码

            $.ajax({
                type: "POST",   //访问WebService使用Post方式请求
             ......

ASP.NET 中的设计模式之MVC篇


ASP.NET 中的设计模式之MVC篇

 
ASP.NET
中的设计模式之
MVC

设计模式
MVC
页面控制器

模板与
Page
基类
设计模式
软件开发中,软件复用和团队协作都一直是最为人们关注的重要问题之一。有趣的是,这两个似乎属于软件工程范畴的问题都有一个共同的技术方面的解决之道:设计模式。
  ......

ASP.NET web app performance issue ThreadPool

 
One of my bank customers planned to roll out a new ASP.NET web application serving as their critical internet banking portal. They faced some weird performance issue in their UAT environment. They noticed the CPU utilization was really high (above 90%) without any fluctuation. After checking ......

asp.net教程:WPF图形系统

  在Windows NT中,图形多媒体系统基于层次结构。应用程序与顶层的API(实际上是多个用户模式的系统DLL,比如GDI32.DLL)交互,这些系统DLL最终会通过系统服务调用处于内核模式的系统服务。
NT系统的详细信息可参考《Windows 图形编程》的第一、二章。在Windows Vista中,图形系统已经移出了内核模式,并有自己的空间 ......

asp.net 动态treeview

js code //主要功能是实现复选框的全选择跟非全选
<script type="text/javascript" defer="defer">
        function OnTreeNodeChecked() {
            var ele = event.srcElement;
    &nbs ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号