E
Eirik Eldorsen
Is it possible to clear the generated html ouput on aspx page, and then
write something else?
Why?
I want to only the html code from a panel, and most important no form tags.
Why? I'm setting contenttype to application/rtf to generate a word file from
the code, and in Word 2003 the form tag is not an invisible element.
I've tried putting my code in Page_Unload but i'm not allowed to user
Response.Write here. Are there any other options?
I use this code to get the html code from the panel:
StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
HtmlTextWriter htmlTW = new HtmlTextWriter(sw);
pnlContent.RenderControl(htmlTW);
string panelHTML = sb.ToString();
Response.Clear();
Response.Write(panelHTML);
Eirik
write something else?
Why?
I want to only the html code from a panel, and most important no form tags.
Why? I'm setting contenttype to application/rtf to generate a word file from
the code, and in Word 2003 the form tag is not an invisible element.
I've tried putting my code in Page_Unload but i'm not allowed to user
Response.Write here. Are there any other options?
I use this code to get the html code from the panel:
StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
HtmlTextWriter htmlTW = new HtmlTextWriter(sw);
pnlContent.RenderControl(htmlTW);
string panelHTML = sb.ToString();
Response.Clear();
Response.Write(panelHTML);
Eirik