在cs页取得当前Web页输出的HTML

      这几天遇到个问题,要在CS页里取得当前输出的HTML,试了试,这个方法不错,写出来,不知道大家有没有更好的方法?
 

System.Globalization.CultureInfo   Culture = new System.Globalization.CultureInfo("ZH-CN",true);
System.IO.StringWriter Writer = new System.IO.StringWriter(Culture);  
System.Web.UI.HtmlTextWriter   HtmlWriter =   new System.Web.UI.HtmlTextWriter(Writer);
this.Page.RenderControl(HtmlWriter);
string Html = Writer.ToString();

你可能感兴趣的:(html)