Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing the Response from Server.Execute

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I was hoping strMyResponse = Server.Execute("blah.asp") would do it, but that was probably a little silly of me.

I need to execute an asp page, retrieve the responded page into a variable, modify the variable, and send the final response to the browser. Is there any possible way of doing this? Can the Response object be read?
 
For this application, you might consider putting the code in question (what's currently on the page you're trying to execute) into an include file and then the processing is all happening on the same page, so you'd have easier access to any variable in that include file....

Unless there's a particular reason you want to keep it on a separate page. If that's the case, then I suggest that you put the variable in question into a session variable on the page that you're calling there, and then accessing that variable on the caller. That would work.

Hope that helps. :)
Paul Prewett
penny.gif
penny.gif
 
could you redefine your problem/task that you're attempting? i couldn't quite follow what you are saying. thanks.
 
Hey artifice, maybe you should consider going down stairs and asking hungry hungry judy if she knows how to do it. All her years of programming in netscape composer may have helped. If that doesn't work, try an include.

Hope this helps
 
okay.. here goes. the page that I'm making opens web content, manually modifies specific areas of code within the site dynamically, then responds with my processed page.

my code starts by opening the requested page into an fso. it then checks the page for any asp code. if there is asp, I have to do a server.execute, because the asp code will not manually parse properly at this point. what I need is the final processed page from server.execute("blah.asp") returned back to my referring page as if it had been a page opened without any asp content.

if no asp code was detected (or in theory if the page is processed and returned), then the code continues to modify the html items that I need to change dynamically. once this is done, the final page is returned to the browser.

i wish that it would be as easy as includes, but many many factors (some that I don't agree with, but have no option in changing) have led me to this very awkward point.

sooo... I have learned that simply assigning Server.Execute to a variable will not give the desired effect. Response.Write from blah.asp are sent directly to the actual response object, the variable in the referring page remains blank, and the page is displayed with the dynamic changes I need.

if my code before the server.execute does not provide any content for the response, then I can get around this by somehow dumping the content written to the Response into a variable and then clearing it, processing the var, and rewriting the Response.

Is it possible to read the Response buffer in any way? (hopingly)

Is there another option that I may be overlooking?

Thanks
 
OMG!!! I think should do it, according to what the site says it does... Everyone has been telling me that it is just impossible. I knew I could do it, but was hoping I wouldn't have to write my own component to accomplish it. Thanks sooo much Swany! Your the best
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top