乱码问题 在把DataGrid中的数据导入excel表格时,excel表格会出现乱码,请高人指点,谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你是BS还是CS啊? HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=Excel.xls") Response.ContentType = "application/vnd.ms-excel" HttpContext.Current.Response.Charset = "" HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.Default DataGrid1.Page.EnableViewState = False Dim tw As StringWriter = New StringWriter() Dim hw As New HtmlTextWriter(tw) DataGrid1.Visible = True DataGrid1.RenderControl(hw) HttpContext.Current.Response.Write(tw.ToString()) HttpContext.Current.Response.End() HttpContext.Current.Response.Charset = "gb2312" C#隐藏展开怎么实现? 用键盘钩子怎么拦截到CTRL+F等组合键? 我有个正常播放器,但是不知道,如何JS控制她的播放和停止及进度条??谢谢。。 请教webform中如何播放WAV? 请问怎样可以用js函数来格式化模板列的数据? 散分!顶者有分!顺便帮个忙! hash函数用来决定储存位置的用什么比较常见的? C#使用水晶报表分组的问题(急) 在命令行程序中是否能使用Active 控件(如mscomm).......等 一个广告,两个问题!!!!!!!!!!!!!!!!!? 正则表达式。急啊 TABLE合并
Response.ContentType = "application/vnd.ms-excel"
HttpContext.Current.Response.Charset = ""
HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.Default
DataGrid1.Page.EnableViewState = False
Dim tw As StringWriter = New StringWriter()
Dim hw As New HtmlTextWriter(tw)
DataGrid1.Visible = True
DataGrid1.RenderControl(hw)
HttpContext.Current.Response.Write(tw.ToString())
HttpContext.Current.Response.End()