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&
相关文档:
///C#中的媒体播放类
using System;
namespace ConfigTools
{
/// <summary>
/// PlayClass 的摘要说明。
///原作CSDN,经本人稍加修改
/// </summary>
public class PlayClass
{
public PlayClass()
{
......
ASP.NET MVC 入门2、项目的目录结构与核心的DLL
收藏
< type="text/javascript">
document.body.oncopy = function() {
if (window.clipb ......
测试的url地址是http://www.test.com/testweb/default.aspx, 结果如下:
Request.ApplicationPath: /testweb
Request.CurrentExecutionFilePath: /testweb/default.aspx
Request.FilePath: /testweb/defa ......
从csdn下载了使用案例,但发现很多人依然会遇到中文文件名乱码的问题,原因如下:
一般在单位的开发中在xml.config文件中都使用gb2312,如下:
<globalization responseEncoding="gb2312" requestEncoding="gb2312"/>
而swfupload是按照utf-8来编码的,所以你需要在使用sufupload的程序文件目录下重新 ......
开发中经常遇到要重置控件值得操作,下面写了常用HTML控件的重置方法。不完整的,大家可以扩充
function ResetControl() {
var v = document.forms[0].elements;
for (var i = ......