导出是将分页属性改为false,还有一种办法转换分页按钮控件,代码太长,asp.net网站上有,你去找一下
解决方案 »
- 请教一个DropDownList的绑定问题
- 在gridview里加了下拉框,怎么样传下拉框的值到objectdatasource
- Ajax回发时的问题
- 如何设置asp.net页面过期
- Access数据库中SQL和ASP.Net中SQL的结果不一致的问题,与LIKE 子句有关,请大家帮忙。
- 请教关于在实现gridview分页功能时如何才能做到点击上一页后出现选择过的东西?
- 窗口每次弹出的时候,都会自动跑到屏幕的任务栏里面??
- 求教育,求批评,nopcommerce3.1中必须登录后才能浏览其他页面怎么回事
- 怎樣讀取listbox的選定值(c#)
- 请你们给我看看呀!!!!急急急!!!!!
- 一个button,click后实现F11全屏,恢复的问题
- 关于chr 函数的问题
{
// HttpContext.Current.Response.Charset ="GB2312";
HttpContext.Current.Response.Charset ="";
HttpContext.Current.Response.AppendHeader("Content-Disposition","attachment;filename=money.xls");
HttpContext.Current.Response.ContentEncoding =System.Text.Encoding.GetEncoding("GB2312");
HttpContext.Current.Response.ContentType ="application/ms-excel";//image/JPEG;text/HTML;image/GIF;vnd.ms-excel/msword
ctl.Page.EnableViewState =false;
System.IO.StringWriter tw = new System.IO.StringWriter() ;
System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter (tw);
ctl.RenderControl(hw);
HttpContext.Current.Response.Write(tw.ToString());
HttpContext.Current.Response.End();
}
用法:ToExcel(DataGrid1);