HttpContext.Current.Response

  • Thread starter Thread starter Stephen Cook
  • Start date Start date
S

Stephen Cook

I've written a suite of components that generate XML which I return in a
stream.

The library is confiured so that the calling component passes the stream on
which wants the XML into the working classes.
I had anticipated passing in HtpContext.Current.Response to include the XML
as a data island in an aspx page.
No string handling, all in streams (hopefully) nice and neat.

And it works(!), except for the timing of the operation.

My XML always gets pumped into the page before any HTML or other content
from the page.
How can I call my code late in the rendering chain?

Many thanks

Steve
 
Stephen Cook said:
I've written a suite of components that generate XML which I return in a
stream.

The library is confiured so that the calling component passes the stream on
which wants the XML into the working classes.
I had anticipated passing in HtpContext.Current.Response to include the XML
as a data island in an aspx page.
No string handling, all in streams (hopefully) nice and neat.

And it works(!), except for the timing of the operation.

My XML always gets pumped into the page before any HTML or other content
from the page.
How can I call my code late in the rendering chain?

Override the Render method on the page and output it then.
 
you need to create a custom control for the xml island. in its Render method
have it call your component. this will cause the xml to be rendered inside
the island (xml tag)

-- bruce (sqlwork.com)
 
Back
Top