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
Ïà¹ØÎĵµ£º
11ÔÂ21ÈÕÍí£·µãÓ¦ÑûÔÚÎ人´óѧÐÅϢѧԺ×öÁËÒ»³¡¹ØÓÚASP.NETÏÂAJAX¿ª·¢µÄ±¨¸æ£¬ÒÔÎÒ×Ô¼º¾Àú½²ÊöÁËһЩÌØÊâÓ¦ÓÃÔÚ¹ýÈ¥µ½ÏÖÔÚʵÏÖÊֶεı仯£¬±¾À´Ïë»Ø¼ÒÖ®ºó×ö¸ö×ܽáµÄ£¬µ«ÊÇÓÉÓÚ×î½üÒÔÀ´ÊÂÇéÒ»Ö±ºÜ¶à£¬ËùÒÔûÓÐÀ´µÃ¼°×ܽᡣ½ñÍíµÃÒÔÓпÕ×ܽáһϡ£
AJAX½éÉÜ
ÆäʵAJAXÓ¦ÓÃµÄºË ......
Èý²ã¼Ü¹¹
±íʾ²ã
ÒµÎñ²ã
Âß¼²ã ÎÒ¾õµÃÖ÷ÒªÊÇDALµÄЧÂÊ£¬Õâ¸ö²ãÓ¦¸ÃÓÃCOMʵÏÖ£¬µ«ÊÇÕâÑùµÄ»°£¬Èç¹ûÊÇDNAµÄ·À»ðǽÓÖ³ÉÁËÎÊÌâ¡£ »¹ÓУ¬·Ö²ãºóµÄ×ÊÔ´ÊÍ·ÅÎÊÌâ¡£ BLL²ãµÄÖ»·ÅÂß¼¹æÔò¾Í¿ÉÒÔÁË£¬ÓÃËüÀ´Á¬½ÓUIºÍDAL ÒµÎñÂß¼²ã(BLL)£ºÖ÷ÒªÊÇÕë¶Ô¾ßÌåµÄÎÊÌâµÄ²Ù×÷£¬Ò²¿ÉÒÔÀ ......
ÏÂͼÖкìÉ«¼ýÍ·ÊǸ¸Àà ¶øÇÒÊôÓÚ¸ùĿ¼¼¶±ð¡£
¡¡¡¡ÏÂÃæ¸ö×Ö¶ÎΪ£ºID¡¡¡¡¸¸ID¡¡ ÀàÐÍÃû³Æ¡¡ Éî¶È¡¡ ÅÅÐò
¡¡¡¡Ç°Ãæ3¸ö×Ö¶ÎûÓÐʲô¿É½âÊ͵ģ¬×ö¹ýÎÞÏÞ¼¶·ÖÀàÉè¼ÆµÄÈ˶¼Ó¦¸ÃÇå³þ
¡¡¡¡¶øµÚ5¸ö×Ö¶ÎÅÅÐò×Ö¶ÎID£º43µÄ23ÅÅÐò´ú±íËûÔÚÕâÕűíÅÅÔÚ23µÄ¸ùĿ¼
¡¡¡¡¶ø23ÏÂÃæµÄ23,01 ˵Ã÷ËûÊÇ2¼¶·ÖÀ࣬ÅÅÔÚ23ÏÂÃæµÄµÚ01¸ö£¬Ò²ÊÇÖ§³Ö99¼ ......
ÅäÖÃASP.NETƽ̨ʱÓöµ½µÄ“·ÃÎÊIISÔªÊý¾Ý¿âʧ°Ü”²»ÖªµÀΪʲô½ñÌìÎÒµÄIISÍ£Ö¹ÁË£¬Í£Ö¹ÁËÎÒ¾ÍÆô¶¯Ï°ѣ¬¿ÉÊÇÆô¶¯²»ÆðÀ´Ñ½£¬ÄÇÔõô°ìѽ£¬Îʰٶȣ¬È˼Ò˵µÄÓиö·þÎñworld wide web Publishing ·þÎñ£¬¿ÉÊÇÎÒ»ú×ÓÉÏÁ¬Õâ¸ö·þÎñ¶¼Ã»ÓУ¬Ã»°ì·¨ÕÒ°Ñ£¬ÕÒÁË°ëÌìûÕÒµ½£¬Ö»ÓдÓа²×°ÁË£¬°²×°Á˺ÃÁË£¬Æô¶¯ÁË£¬ÓÖ³öÏ ......