P
Philip
I need to capture the HTML output from a Gridview control....so I am
executing the following code...
StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
HtmlTextWriter htw = new HtmlTextWriter(sw);
MyGridview.RenderControl(htw);
This technique works fine with many controls, however with the Gridview I
get the following HttpException...
"...MyGridview of type "Gridview" must be placed inside a form tag with
runat=server.
Of course....it is placed inside of a form tag.... I am simply trying to
capture the rendered HTML output beforehand.
Can you suggest an alternative, why this works with other controls ?....
Thanks
executing the following code...
StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
HtmlTextWriter htw = new HtmlTextWriter(sw);
MyGridview.RenderControl(htw);
This technique works fine with many controls, however with the Gridview I
get the following HttpException...
"...MyGridview of type "Gridview" must be placed inside a form tag with
runat=server.
Of course....it is placed inside of a form tag.... I am simply trying to
capture the rendered HTML output beforehand.
Can you suggest an alternative, why this works with other controls ?....
Thanks