原来可以这样得到控件的html文本

 

   System.IO.StringWriter oStringWriter = new System.IO.StringWriter(); 
   System.Web.UI.HtmlTextWriter oHtmlTextWriter 
= new System.Web.UI.HtmlTextWriter(oStringWriter); 
   
this.DataGrid1.RenderControl(oHtmlTextWriter); 
   Response.Write(oStringWriter.ToString()); 
   Response.End(); 
posted on 2005-06-17 16:04  吴磊  阅读(844)  评论(0编辑  收藏  举报