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&
Ïà¹ØÎĵµ£º
×î½ü¿ª·¢ÖÐÔÚÒ³ÃæÖ®¼ä´«µÝÖµµÄ¹ý³ÌÖУ¬¶à´¦Ó¦ÓÃÁ˳¬Á´½Ó´«ÖµµÄ·½Ê½¡£µ«Êǵ±´«µÝµÄ²ÎÊýÖк¬ÓÐÖÐÎÄ×Ö·ûʱ£¬ÔÚµ÷ÓÃRequest.QueryString[]·½·¨½ÓÊÕ²ÎÊýʱ£¬×ÜÊdzöÏÖ´íÎ󣬶øÇÒ´íÎóµÄ³öÏÖ×ÜÊÇËæ»úµÄ¡£±íÏÖΪ½ÓÊÕµÄÖÐÎIJÎÊý²»È«£¬ºó¼ÓͨÅä·û“£¿”£¬»òÕß°ÑÖÐÎIJÎÊýºóµÄÄǸö²ÎÊýºÍÖÐÎIJÎÊý»ìÔÚÒ»Æ𣬲»¼ÓÇø·Ö¡£
& ......
ʼþÄ£ÐÍ
µ±Ä³¸öÒ³Ãæ±»ÇëÇóʱ£¬ËüµÄÀ༰ÆäËù°üº¬µÄ·þÎñÆ÷¿Ø¼þ»á¸ºÔð´¦ÀíÇëÇ󣬳ÊÏÖHTMLÊä³ö£¬²¢Ëæºó·¢»Ø¿Í»§¶Ë¡£ÓÉÓÚHTTPÐÒéµÄ¹ÌÓÐÌØÐÔ£¬¿Í»§¶ËÓë·þÎñÆ÷¼äµÄͨÐÅÊÇÎÞ״̬ÇÒ·ÇÁ¬½ÓµÄ¡£¶øʵ¼ÊµÄÓ¦ÓóÌÐòÐèҪ״̬£¬ÒÔ±ãά»¤¶ÔͬһҳÃæµÄºóÐøµ÷Óá£Ê¹ÓÃASP»òÆäËû·þÎñÆ÷¶Ë¿ª·¢Æ½Ì¨(ÈçJava Server PageºÍLAMPÒ»ÀàµÄ»ùÓÚLinuxµÄÏ ......
´ÓcsdnÏÂÔØÁËʹÓð¸Àý£¬µ«·¢ÏֺܶàÈËÒÀÈ»»áÓöµ½ÖÐÎÄÎļþÃûÂÒÂëµÄÎÊÌ⣬ÔÒòÈçÏ£º
Ò»°ãÔÚµ¥Î»µÄ¿ª·¢ÖÐÔÚxml.configÎļþÖж¼Ê¹ÓÃgb2312£¬ÈçÏ£º
<globalization responseEncoding="gb2312" requestEncoding="gb2312"/>
¶øswfuploadÊÇ°´ÕÕutf-8À´±àÂëµÄ£¬ËùÒÔÄãÐèÒªÔÚʹÓÃsufuploadµÄ³ÌÐòÎļþĿ¼ÏÂÖØР......
This server-based method is documented in the Visual Studio help files. Open the Help Index, and enter PrintToPrinter in the "Look for:" box. The syntax for this method is:
Report.PrintToPrinter(<copies as int>, <collated as True/False>, <startpage as int>, <endp ......
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 ......