Ask a Question related to ASP.NET General, Design and Development.
-
Rick Strahl [MVP] #1
Capturing ASPX output from another page
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
[url]http://www.west-wind.com/[/url]
[url]http://www.west-wind.com/wwHelp[/url]
----------------------------------
Making waves on the Web
Rick Strahl [MVP] Guest
-
capturing control output
To produce 1 dynamic chart, I add a control to my aspx page positioned in a placeholder. I need to have more than one chart and need to capture... -
Accessing a aspx page using HttpWebRequest from another aspx page on the same webapp
Did you have any luck on this as I have the same problem. Maybe you can help me out of you solved your problem. -
capturing output of a shell comand
Hi everyone.... I have been trying to capture the output of a shell command (say ls or echo *) in a variable but all i have been able to capture is... -
[PHP] Capturing script output
Joel Konkle-Parker <mailto:jjk3@msstate.edu> on Thursday, August 21, 2003 9:17 AM said: 1. Remove the buffering calls that are within the... -
Capturing script output
I've got somewhat of a methodology question here. I've got a YaBBSE message board <http://yabbse.org> that I'm trying to integrate into my site... -
Steve C. Orr, MCSD #2
Re: Capturing ASPX output from another page
You can use the WebRequest object to call your web page, then you can
capture the HTML that it output.
Here's a nice example:
[url]http://www.digitalvideotoolbox.com/Modules/AspFaq/ShowQuestion.aspx?QID=88[/url]
--
I hope this helps,
Steve C. Orr, MCSD
[url]http://Steve.Orr.net[/url]
"Rick Strahl [MVP]" <rickstrahl@hotmail.com> wrote in message
news:%23l3rxqkRDHA.2480@tk2msftngp13.phx.gbl...> I often have the need to run templates that perform the equivalent of aof> 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 consistshave> 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 youRender()> to pass state back and forth across pages.
>
> I know I can capture output from the current page by overriding theto> method of the page and that works for many things as long as the contentthe> 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> 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
> [url]http://www.west-wind.com/[/url]
> [url]http://www.west-wind.com/wwHelp[/url]
> ----------------------------------
> Making waves on the Web
>
>
>
>
Steve C. Orr, MCSD Guest



Reply With Quote

