Question about server.execute

Results 1 to 2 of 2

Thread: Question about server.execute

  1. #1
    Join Date
    Dec 1969

    Default Question about server.execute

    I am having a small problem with the server.execute command. I have seen everywhere that this command will be a substitute for include files. I have been waiting for this and I have be very excited to have it come about, cause it would enable us to dynamically include files. Well, I am now experimenting with the command for the first time. Everything was going great until I tried to use a variable,that was in the first .asp file, in the second, included, page. Like the below. Is there any way of doing this? Is there just a setting that I might be missing or something? If this is a "real" limitation of server.execute, then I must say that I am not impressed. What is the poine of a dynamic include if it won&#039t keep the variables available. Please help.<BR><BR>*****firstpage.asp*****<BR>&#060;%@<B R> Language=VBScript<BR> EnableSessionState=False<BR>%&#062;<BR>&#060;% Option Explicit %&#062;<BR>&#060;% response.buffer = "true" %&#062;<BR>&#060;%<BR> dim testVar<BR> testVar = "Testing 123"<BR> server.execute("nextpage.asp")<BR>%&#062;<BR><BR>* ****nextpage.asp*****<BR>&#060;%<BR> response.write testVar<BR>%&#062;<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Question about server.execute

    I dont think server.execute() works like an actual include file. It runs in its own space and uses its own varibles. But there is a command called server.transfer() that may help. It transfers all varibles over and continues to process as normal. Im not sure if it returns to the calling script though.<BR><BR>check out the specs here<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts