Capturing ASPX output from another page

  • Thread starter Rick Strahl [MVP]
  • Start date
R

Rick Strahl [MVP]

I often have the need to run templates that perform the equivalent of a mail
merge as part of the processing for another page. For example, I have an
invoice display page in my admin module and hten need to send a prepared
message (such as a declined order email) to the invoicee, which consists of
a merge letter.

Server.Transfer() doesn't do the trick, as it leaves the current page and
doesn't return. I could do this but this is quite a hassle to do as you have
to pass state back and forth across pages.

I know I can capture output from the current page by overriding the Render()
method of the page and that works for many things as long as the content to
merge is the same as the current page (works well for things like Invoice
Confirmations)... but is there anyway to cause another page to be
instantiated and be rendered via code (ie. without calling the ASPX file??
I've tried to do this by instantiating the class, but it would seem that the
HTTP runtime needs to know more info in order to render or even fire the
code in the form...

Any ideas on how to accomplish this?


+++ Rick ---


--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/wwHelp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top