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
Ïà¹ØÎĵµ£º
Èý²ã¼Ü¹¹
±íʾ²ã
ÒµÎñ²ã
Âß¼²ã ÎÒ¾õµÃÖ÷ÒªÊÇDALµÄЧÂÊ£¬Õâ¸ö²ãÓ¦¸ÃÓÃCOMʵÏÖ£¬µ«ÊÇÕâÑùµÄ»°£¬Èç¹ûÊÇDNAµÄ·À»ðǽÓÖ³ÉÁËÎÊÌâ¡£ »¹ÓУ¬·Ö²ãºóµÄ×ÊÔ´ÊÍ·ÅÎÊÌâ¡£ BLL²ãµÄÖ»·ÅÂß¼¹æÔò¾Í¿ÉÒÔÁË£¬ÓÃËüÀ´Á¬½ÓUIºÍDAL ÒµÎñÂß¼²ã(BLL)£ºÖ÷ÒªÊÇÕë¶Ô¾ßÌåµÄÎÊÌâµÄ²Ù×÷£¬Ò²¿ÉÒÔÀ ......
ASP.NET MVC FrameworkÊÇ΢Èí¹Ù·½ÌṩµÄMVCģʽ±àдASP.NET WebÓ¦ÓóÌÐòµÄÒ»¸ö¿ò¼Ü.ÒÑÓÚ2009Äê3ÔÂ19ÈÕÕýʽ·¢²¼. MVC(Model-View-Controller)ÓÃÓÚ±íʾһÖÖÈí¼þ¼Ü¹¹Ä£Ê½.Ëü°ÑÈí¼þϵͳ·ÖΪÈý¸ö»ù±¾²¿·Ö:Ä£ÐÍ(Model),ÊÓͼ(View)ºÍ¿ØÖÆÆ÷(Controller). ¼ÈÈ»ÊÇÒ»¸öÓÅÐãµÄ¿ò¼Ü£¬ÄÇô¾ÍÖµµÃȥѧϰһ°Ñ£¬ÍøÉÏËÑË÷ÁËÐí¶à×ÊÁÏ£¬Ï£Íû¶ÔÓ ......
1£© ¶àѡЧ¹û
¶àѡЧ¹ûÍêÈ«¿ÉÒÔͨ¹ý½Å±¾½øÐÐʵÏÖ¡£ÎÒÃÇÖªµÀ£¬¶àÑ¡µÄ¿Ø¼þ×îÖÕÉú³ÉÒ»¸öinputµÄHTML±êÇ©£¬ËüµÄÀàÐÍÊÇcheckbox¡£ÓÉÓÚÕâ¸öÒ³ÃæÖÐÖ»ÓÐÒ»×鸴ѡ¿ò£¬ËùÒÔʵÏÖÆðÀ´Ò²±È½Ï·½±ã£ºÎÒÃÇ¿ÉÒÔ±éÀúËùÓеÄinput±êÇ©£¬¶Ô±ÈÆätypeÊôÐÔÊDz»ÊÇcheckbox£¬Èç¹ûÊÇcheckbox£¬¾Í¸øËüÉèÖÃÏàÓ¦µÄÑ¡ÖÐ״̬¾ÍÐÐÁË¡£
´úÂëÈçÏ£º
<scri ......
Ö÷Ìå¼Ü¹¹
¡¡¡¡¸÷ƵµÀ·Ö±ðλÓÚ²»Í¬µÄWeb Project(¾ßÓжÀÁ¢µÄ¶þ¼¶ÓòÃû)£¬²¢½«ËùÓеÄÒµÎñÂß¼ÒÔ¼°Êý¾Ý·ÃÎʹ¦ÄÜ·â×°³ÉClass Library£¬ËùÓÐÆµµÀ¹²ÓÃÕâ¸öClass Library¡£
¡¡¡¡ÏÂÃæÏêϸ½éÉÜʵÏÖ·½·¨¡£
¡¡¡¡¼ÙÉèÍøÕ¾ÓÐÈý¸öƵµÀ£¬ÐÂÎÅ¡¢ÂÛ̳ÒÔ¼°²©¿Í£¬¶ÔÓ¦µÄ¶þ¼¶ÓòÃûΪ"news"¡¢"forum"¡¢"blog"¡£³ý´ËÖ®Í⣬»¹ÐèÒªÁ ......
Õ⼸ÌìÒ»Ö±ÔÚÎ§ÈÆASP.NET MVC½øÐÐѧϰ£¬ËäȻ֮ǰ½Ó´¥ÁËһЩ£¬µ«ÊÇ»¹Ã»ÓÐÕâôϵͳµÄ×ö¹ýÏà¹ØµÄ²âÊÔѧϰ£¬ÔÚ×îºó¶ÔÆä½øÐÐ×ܽᣬϣÍû¶ÔÓÚ³õѧMVCµÄÈ˶¼ÓÐËù°ïÖú¡£
ÏÖÔÚ½«ASP.NET MVCµÄһϵÁÐÎÄÕÂÕûÀíÈçÏ£º
1¡¢¡¾ASP.NETרÌâ¡¿(1)——ASP.NET MVC³õ̽£º
http://blog.csdn.net/rocket5725/archive/2010/01/11/5177 ......