ASP.NETÊý¾Ý¿âµ¼ÈëExcel
StringWriter sw = new StringWriter();
sw.WriteLine("·ÃÎʹºÂòÂÊ");
sw.WriteLine("ÅÅÐÐ\tÉÌÆ·Ãû³Æ\tÈËÆøÖ¸Êý\t¹ºÂò´ÎÊý\t·ÃÎʹºÂòÂÊ");
int i = 0;
foreach (ProductSaleInfo productSale in productSaleList)
{
i = i + 1;
sw.WriteLine(i.ToString() + "\t" + productSale.Name.ToString() + "\t" + productSale.ViewCount.ToString() + "\t" + productSale.SaleCount.ToString() + "\t" + XWXCommon.ProductBuyRate(productSale.ViewCount.ToString(), productSale.SaleCount.ToString()));
}
sw.Close();
Response.Clear();
Response.Buffer = true;
Response.Charset = "GB2312";
Response.AppendHeader("Content-Disposition&
Ïà¹ØÎĵµ£º
£¨×ª ÔÎĵØÖ·http://blog.sina.com.cn/s/blog_524c848901009e7b.html~type=v5_one&label=rela_nextarticle ×÷Õß
ÀîÑóµÄ²©¿Í
http://blog.sina.com.cn/liiyang£©
66.Èí¼þ¿ª·¢¹ý³ÌÒ»°ãÓм¸¸ö½×¶Î£¿Ã¿¸ö½×¶ÎµÄ×÷Óã¿
´ð£ºÐèÇó·ÖÎö£¬¼Ü¹¹Éè¼Æ£¬´úÂë±àд£¬QA£¬²¿Êð
67.ÔÚc#ÖÐusingºÍnewÕâÁ½¸ö¹Ø¼ü×ÖÓÐʲôÒâÒ壬 ......
²âÊÔµÄurlµØÖ·ÊÇhttp://www.test.com/testweb/default.aspx, ½á¹ûÈçÏ£º
Request.ApplicationPath: /testweb
Request.CurrentExecutionFilePath: /testweb/default.aspx
Request.FilePath: /testweb/defa ......
ʼþÄ£ÐÍ
µ±Ä³¸öÒ³Ãæ±»ÇëÇóʱ£¬ËüµÄÀ༰ÆäËù°üº¬µÄ·þÎñÆ÷¿Ø¼þ»á¸ºÔð´¦ÀíÇëÇ󣬳ÊÏÖHTMLÊä³ö£¬²¢Ëæºó·¢»Ø¿Í»§¶Ë¡£ÓÉÓÚHTTPÐÒéµÄ¹ÌÓÐÌØÐÔ£¬¿Í»§¶ËÓë·þÎñÆ÷¼äµÄͨÐÅÊÇÎÞ״̬ÇÒ·ÇÁ¬½ÓµÄ¡£¶øʵ¼ÊµÄÓ¦ÓóÌÐòÐèҪ״̬£¬ÒÔ±ãά»¤¶ÔͬһҳÃæµÄºóÐøµ÷Óá£Ê¹ÓÃASP»òÆäËû·þÎñÆ÷¶Ë¿ª·¢Æ½Ì¨(ÈçJava Server PageºÍLAMPÒ»ÀàµÄ»ùÓÚLinuxµÄÏ ......
1.ͨ¹ýRewritePathʵÏÖÖØд
URLÖØд¿ÉÒÔͨ¹ý±à³ÌµÄ·½Ê½À´ÊµÏÖ¡£ASP.NETÖеÄContex.RewritePath()·½·¨¿ÉÒÔÈÃÄã´Ó³ÌÐòÖÐʵÏÖÖØдÇëÇóµÄURL¡£Ò»µ©ÖØдºó£¬ÏµÍ³½«Ê¹ÓÃеķ¾¶À´¼ÌÐøÖ´ÐÐÕâ¸öÇëÇó¡£
ÔÚGlobal.asaxÎļþµÄApplication_BeginRequest()·½·¨ÖУ¬ÄãÐèÒªÔö¼Ó´úÂëÀ ......
ÔÚASPÖУ¬½«ÎļþÉÏ´«µ½·þÎñÆ÷ÊÇÒ»¼þ·Ç³£Âé·³µÄÊÂÇ飬ͨ³£ÐèÒªµÚÈý·½×é¼þµÄÖ§³Ö¡£
ÔÚASP.NET 1.x ÖУ¬ÒªÖ§³ÖÎļþÉÏ´«£¬Ö»ÐëʹÓÃHTMLµÄInput(File)¿Ø¼þ¡£°ÑËü×÷Ϊ·þÎñÆ÷¿Ø¼þÔËÐУ¨ÊÖ¶¯ÉèÖÃrunat="server"£© £¬ÒªÖ±½Ó²Ù×÷ HttpPostedFile¡£
ÔÚASP.NET 2.0ÖУ¬ÐÂÔöÁËFileUpLoad·þÎñÆ÷¿Ø¼þ£¬Ê¹µÃÉÏ´«¸ü¼Ó¼òµ¥¡£
°ü& ......