I donβt understand why not.
Try the RenderControl () method to get html from a web page or web control.
static public string GetHTML(Control myControl)
{
System.IO.StringWriter sw = new System.IO.StringWriter();
HtmlTextWriter myWriter = new HtmlTextWriter(sw);
myControl.RenderControl(myWriter);
return sw.ToString();
}
I use this to render GridViews asynchronously.
source
share