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&
Ïà¹ØÎĵµ£º
ÔÚ×öasp.netµÄWeb¿ª·¢µÄʱºò£¬ÎÒÃǾ³£»áÓöµ½Ò»´ÎÐÔÉÏ´«¶à¸öÎļþµÄÐèÇó¡£Í¨³£ÎÒÃǵĽâ¾ö·½·¨Êǹ̶¨·Å¶à¸öÉÏ´«Îļþ¿ò£¬ÕâÑùµÄ½â¾ö°ì·¨ÏÔÈ»ÊDz»ºÏÀíµÄ£¬ÒòΪһ´ÎÉÏ´«¶à¸ö£¬¾ÍÒâζ×ÅÊýÁ¿²»È·¶¨¡£Òò´ËÎÒÃǾÍÒªÈÃÕâЩÎļþÉÏ´«¿ò¶¯Ì¬Ìí¼Ó£¬ÏÂÃæÎÒÒÔÎÒ×öµÄÒ»¸öͼ¿â¹ÜÀíÖеÄÉÏ´«Í¼Æ¬µÄ¹¦ÄÜΪÀý
ÏÈ¿´Ð§¹û£º
´ò¿ªµÄ³õʼ½çÃæ£º
ĬÈÏ ......
¿ª·¢Öо³£Óöµ½ÒªÖØÖÿؼþÖµµÃ²Ù×÷£¬ÏÂÃæÐ´Á˳£ÓÃHTML¿Ø¼þµÄÖØÖ÷½·¨¡£²»ÍêÕûµÄ£¬´ó¼Ò¿ÉÒÔÀ©³ä
function ResetControl() {
var v = document.forms[0].elements;
for (var i = ......
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using System.Data.Common;
using System.Data;
namespace DownData.dal
{
public static class DBHelper
{
private stati ......
1.ͨ¹ýRewritePathʵÏÖÖØÐ´
URLÖØÐ´¿ÉÒÔͨ¹ý±à³ÌµÄ·½Ê½À´ÊµÏÖ¡£ASP.NETÖеÄContex.RewritePath()·½·¨¿ÉÒÔÈÃÄã´Ó³ÌÐòÖÐʵÏÖÖØÐ´ÇëÇóµÄURL¡£Ò»µ©ÖØÐ´ºó£¬ÏµÍ³½«Ê¹ÓÃеķ¾¶À´¼ÌÐøÖ´ÐÐÕâ¸öÇëÇó¡£
ÔÚGlobal.asaxÎļþµÄApplication_BeginRequest()·½·¨ÖУ¬ÄãÐèÒªÔö¼Ó´úÂëÀ ......