.....................
   ......................
   DataGrid1.DataBind();
    数据绑定!


   Response.Clear();
   Response.Buffer=true;
   Response.ContentType="application/vnd.ms-excel";
   Response.Charset="";
   this.EnableViewState=false;

   System.IO.StringWriter sw = new StringWriter();
   HtmlTextWriter  htw=new  HtmlTextWriter(sw);
   DataGrid1.RenderControl(htw);
   Response.Write(sw.ToString());
   Response.End();

相关文章:

  • 2021-09-30
  • 2021-12-01
  • 2021-10-22
  • 2021-11-16
猜你喜欢
  • 2022-12-23
  • 2021-10-04
  • 2022-12-23
  • 2022-12-23
  • 2022-02-02
相关资源
相似解决方案