This text is right before the call to Server.Execute.
This text is in the server_target.asp file, but remember that the
context from the calling page is passed when the target file is executed. That
means that calls to things like Request.ServerVariables("SCRIPT_NAME") may not
return the value you might expect.
Even though the line of code being executed is actually located in server_target.asp,
it's still running in the context of the original page which, in this case, is
server_execute.asp.
This text is right after the call to Server.Execute.
The target script ("server_target.asp")
If you've been using ASP for any length of time, you've almost certainly used Response.Redirect
to move a user from one page to another. While Response.Redirect gets the job done, it unfortunately
requires a round trip to the client browser. While there are some situations where this is necessary,
more often then not you can accomplish the task more efficiently using Server.Execute.
While Response.Redirect accomplishes its task by telling the browser to look elsewhere, Server.Execute
does its work on the server by simply transferring execution to the script passed to it as a parameter.
When that script finishes execution, control returns to the calling page. For example, this page is
called server_execute.asp. While the sentences before and after the green section are in this file,
the green section itself is actually contained in the file server_target.asp. Notice that while
server_target.asp was executed, your browser never left server_execute.asp like it would have if
we'd used Response.Redirect.
One important note is that while execution passes from server_execute.asp to server_target.asp and
back, the page context remains the same. What this means is that calls to things like
Request.ServerVariables("SCRIPT_NAME") will continue to return server_execute.asp even if
they are actually in the server_target.asp file. Similarly, if you transfer execution to a
different directory, the client browser won't know that so things like <img> tags in
the target script may need to be adjusted so that the browser can still find the intended targets.