Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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);
        Response.AddHeader("Content-Length", fileInfo.Lengt


Ïà¹ØÎĵµ£º

ASP.NET¶à²ã½á¹¹

  Èý²ã¼Ü¹¹
±íʾ²ã 
ÒµÎñ²ã 
Âß¼­²ã  ÎÒ¾õµÃÖ÷ÒªÊÇDALµÄЧÂÊ£¬Õâ¸ö²ãÓ¦¸ÃÓÃCOMʵÏÖ£¬µ«ÊÇÕâÑùµÄ»°£¬Èç¹ûÊÇDNAµÄ·À»ðǽÓÖ³ÉÁËÎÊÌâ¡£  »¹ÓУ¬·Ö²ãºóµÄ×ÊÔ´ÊÍ·ÅÎÊÌâ¡£  BLL²ãµÄÖ»·ÅÂß¼­¹æÔò¾Í¿ÉÒÔÁË£¬ÓÃËüÀ´Á¬½ÓUIºÍDAL ÒµÎñÂß¼­²ã(BLL)£ºÖ÷ÒªÊÇÕë¶Ô¾ßÌåµÄÎÊÌâµÄ²Ù×÷£¬Ò²¿ÉÒÔÀ ......

¡¾ASP.NETרÌâ¡¿(1)——ASP.NET MVC³õ̽

ASP.NET MVC FrameworkÊÇ΢Èí¹Ù·½ÌṩµÄMVCģʽ±àдASP.NET WebÓ¦ÓóÌÐòµÄÒ»¸ö¿ò¼Ü.ÒÑÓÚ2009Äê3ÔÂ19ÈÕÕýʽ·¢²¼. MVC(Model-View-Controller)ÓÃÓÚ±íʾһÖÖÈí¼þ¼Ü¹¹Ä£Ê½.Ëü°ÑÈí¼þϵͳ·ÖΪÈý¸ö»ù±¾²¿·Ö:Ä£ÐÍ(Model),ÊÓͼ(View)ºÍ¿ØÖÆÆ÷(Controller). ¼ÈÈ»ÊÇÒ»¸öÓÅÐãµÄ¿ò¼Ü£¬ÄÇô¾ÍÖµµÃȥѧϰһ°Ñ£¬ÍøÉÏËÑË÷ÁËÐí¶à×ÊÁÏ£¬Ï£Íû¶ÔÓ ......

ASP.NETÖжàѡЧ¹ûÓë¹â°ôЧ¹û£¨ÏÖʵ´úÂ룩

1£© ¶àѡЧ¹û
¶àѡЧ¹ûÍêÈ«¿ÉÒÔͨ¹ý½Å±¾½øÐÐʵÏÖ¡£ÎÒÃÇÖªµÀ£¬¶àÑ¡µÄ¿Ø¼þ×îÖÕÉú³ÉÒ»¸öinputµÄHTML±êÇ©£¬ËüµÄÀàÐÍÊÇcheckbox¡£ÓÉÓÚÕâ¸öÒ³ÃæÖÐÖ»ÓÐÒ»×鸴ѡ¿ò£¬ËùÒÔʵÏÖÆðÀ´Ò²±È½Ï·½±ã£ºÎÒÃÇ¿ÉÒÔ±éÀúËùÓеÄinput±êÇ©£¬¶Ô±ÈÆätypeÊôÐÔÊDz»ÊÇcheckbox£¬Èç¹ûÊÇcheckbox£¬¾Í¸øËüÉèÖÃÏàÓ¦µÄÑ¡ÖÐ״̬¾ÍÐÐÁË¡£
´úÂëÈçÏ£º
<scri ......

ASP.NET¶àƵµÀÍøÕ¾¼Ü¹¹ÊµÏÖ·½·¨

Ö÷Ìå¼Ü¹¹
¡¡¡¡¸÷ƵµÀ·Ö±ðλÓÚ²»Í¬µÄWeb Project(¾ßÓжÀÁ¢µÄ¶þ¼¶ÓòÃû)£¬²¢½«ËùÓеÄÒµÎñÂß¼­ÒÔ¼°Êý¾Ý·ÃÎʹ¦ÄÜ·â×°³ÉClass Library£¬ËùÓÐÆµµÀ¹²ÓÃÕâ¸öClass Library¡£ 
¡¡¡¡ÏÂÃæÏêϸ½éÉÜʵÏÖ·½·¨¡£ 
¡¡¡¡¼ÙÉèÍøÕ¾ÓÐÈý¸öƵµÀ£¬ÐÂÎÅ¡¢ÂÛ̳ÒÔ¼°²©¿Í£¬¶ÔÓ¦µÄ¶þ¼¶ÓòÃûΪ"news"¡¢"forum"¡¢"blog"¡£³ý´ËÖ®Í⣬»¹ÐèÒªÁ ......

¡¾ASP.NETרÌâ¡¿(9)——ASP.NET MVC×ܽá

Õ⼸ÌìÒ»Ö±ÔÚÎ§ÈÆASP.NET MVC½øÐÐѧϰ£¬ËäȻ֮ǰ½Ó´¥ÁËһЩ£¬µ«ÊÇ»¹Ã»ÓÐÕâôϵͳµÄ×ö¹ýÏà¹ØµÄ²âÊÔѧϰ£¬ÔÚ×îºó¶ÔÆä½øÐÐ×ܽᣬϣÍû¶ÔÓÚ³õѧMVCµÄÈ˶¼ÓÐËù°ïÖú¡£
ÏÖÔÚ½«ASP.NET MVCµÄһϵÁÐÎÄÕÂÕûÀíÈçÏ£º
1¡¢¡¾ASP.NETרÌâ¡¿(1)——ASP.NET MVC³õ̽£º
http://blog.csdn.net/rocket5725/archive/2010/01/11/5177 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ