I have a ASP.NET page. I have another asp.net page, that i would like to render and import it's rendered results into my asp.net page. I don't want to use or use AJAX request as that would cause my visitors to make an unnecessary HTTP request and decrease performance.
A:
Override the calling page's Render method to call the target page's Render method and insert the contents in the rendered output..
Colin
2009-06-26 22:22:13
How about page life cycle of the other page?
John Saunders
2009-06-26 22:47:54
+1
A:
I haven't tried this myself, but take a look at the Execute(String, TextWriter, Boolean) method of the HttpServerUtility class:
Server.Execute("OtherPage.aspx", Response.Output, true);
John Saunders
2009-06-26 22:53:22
Now that I've got you motivated, go read through the MSDN documentation on the HttpServerUtility, HttpRequest, HttpResponse and HttpContext objects. You won't catch all the features all at once, but we depend on them so much, that it's good to scan the documentation from time to time, at least a couple of times a year. I've never used this call, but I knew it was there, and this is how I knew.
John Saunders
2009-06-26 23:54:22