"Jon Paal [MSMD]" wrote:
> Server.execute is a dynamic include, so any variables defined in the parent file will also be availabel in the "include" file, since
> they execute within the same page scope.
>
> http://support.microsoft.com/kb/224363
>
Thank you, Jon Paal. The variables that are available to the script in the
CALLED file are the ASP object variables like Server, Request, Response,
Application, etc., and most importantly, variables in the Session object.
The VBScript variables do not scope beyond the CALLING file as they do with
the #Include directive. It's very frustrating.
BTW, the article you mentioned has some problems; I think they should pull
it. For example, the data stream to the client includes...
<html>
<body>
<html>
<body>
....
</body>
</html>
</body>
</html>
....which works, but, well they need to do more than just test their examples.
An excellent (albeit somewhat verbose) alternative article is this one:
http://msdn.microsoft.com/msdnmag/issues/0400/redir/
Yet even that one fails to mention (I think) the subject of returning (or
not...) values back to the CALLING script.
Can you think of any other ways?
Thanks,
Jim