M
matt
hello,
is there a way to programmatically loadup one of your .aspx pages, as
if it had been rendered to an actual request?
something like:
//create the page in memory
SomePage somePage = new SomePage();
//prep the writers
StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
HtmlTextWriter htw = new HtmlTextWriter(sw);
//render the page
somePage.RenderControl(htw);
//snag its html
string bodyHTML = sb.ToString();
....is there a way to do this? the above doesnt really do anything. the
bodyHTML appears always empty.
im aware of the WebRequest technique, whereby i pass in the page's URL
and get its response streamed back. however, that has a drawback in
that Session is lost.
i need a way for one webpage to get another webpage's content, and that
content is based on somethings that must be passed via any state
method. session, cookie, whatever works. except the querystring -- i
believe theres a character-limit on the QS, and i dont want to even
worry about hitting it.
thanks!
matt
is there a way to programmatically loadup one of your .aspx pages, as
if it had been rendered to an actual request?
something like:
//create the page in memory
SomePage somePage = new SomePage();
//prep the writers
StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
HtmlTextWriter htw = new HtmlTextWriter(sw);
//render the page
somePage.RenderControl(htw);
//snag its html
string bodyHTML = sb.ToString();
....is there a way to do this? the above doesnt really do anything. the
bodyHTML appears always empty.
im aware of the WebRequest technique, whereby i pass in the page's URL
and get its response streamed back. however, that has a drawback in
that Session is lost.
i need a way for one webpage to get another webpage's content, and that
content is based on somethings that must be passed via any state
method. session, cookie, whatever works. except the querystring -- i
believe theres a character-limit on the QS, and i dont want to even
worry about hitting it.
thanks!
matt