我自己有個函數.但只能導出一個DATAGRID.:(大家有好建議嗎?請各位指示一下.
解决方案 »
- 综合缴费平台的实现思路大家给个思路谢谢啦
- asp.net 页面表格 打印到PDF
- asp.net MVC
- ASP.NET 怎么返回系统的月份和日期?
- ajax返回服务端结果的问题?请教高手
- 二级域名http://def(1).abc.cn/,用Request.Url.ToString()赋值会出错,什么原因?
- 求助,大哥大姐快帮帮忙呀!!!
- *********如果数据库里的某个表在一个小时里没有数据资料转入,那么自动发送EMAIL给某个人的功能怎么实现?
- “输入字符串格式不正确”﹐这到底是怎么样的错误呢?
- 如何将本地服务器上的网站传到阿里云服务器上?
- C#里面有沒有函數.我現在知道2006年和18周.就直接得出是幾號至幾號的?
- 求救
{
_page.Response.Clear();
_page.Response.Buffer = true;
_page.Response.Charset = "UTF-8"; //Encoding.Default.ToString() ;//"GB2312", StringBuilder m_strName = new StringBuilder();
m_strName.Append(DateTime.Now.Year.ToString()).Append(DateTime.Now.Month.ToString())
.Append(DateTime.Now.Day.ToString()).Append(DateTime.Now.Hour.ToString())
.Append(DateTime.Now.Minute.ToString()).Append(DateTime.Now.Second.ToString()); _page.Response.AppendHeader("Content-Disposition", "attachment;filename=ExportData" + m_strName.ToString() + ".xls"); _page.Response.ContentEncoding = Encoding.GetEncoding("UTF-8"); //
//_page.Response.ContentEncoding = Encoding.Default; _page.Response.ContentType = "application/ms-excel"; _page.EnableViewState = false; //CultureInfo m_CI = new CultureInfo("zh-hk", true); //("EN-US",true);
//StringWriter m_stringWriter = new StringWriter(m_CI);
StringWriter m_stringWriter = new StringWriter();
HtmlTextWriter m_htmlTextWriter = new HtmlTextWriter(m_stringWriter); //added by kevin start
//string header = string.Format("<html><head><meta http-equiv=\"content-type\" content=\"text/html; charset={0}\"></head><body>",_page.Response.ContentEncoding.WebName);
string header =
string.Format("<html><head><meta http-equiv=\"content-type\" content=\"text/html; charset={0}\"></head><body>",
"UTF-8"); string footer = "</body></html>"; //added by kevin end //htmlTextWriter
m_grid.RenderControl(m_htmlTextWriter); _page.Response.Write(header + m_stringWriter.ToString() + footer); //
_page.Response.End();
}
http://community.csdn.net/Expert/TopicView.asp?id=4843558为什么我的帖子老上不了问题列表呢?