ASP 3.0 - Server.Execute Problems: Suffering from “ASP Amnesia”

前端 未结 3 1211
清歌不尽
清歌不尽 2021-01-27 04:21

Created Two ASP 3.0 Files: -Main.asp -Colors.asp


Main.asp

<%

Blah Blah Blah...

If sColor = true then
Server.Execute \"Colors.asp\"
End If
\'         


        
3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-27 04:35

    The documentation (http://msdn.microsoft.com/en-us/library/ms525849(v=vs.90).aspx) says :

    The Execute method calls an .asp file, and processes it as if it were part of the calling ASP script. The Execute method is similar to a procedure call in many programming languages.

    If it's similar to a procedure call I guess it makes sense to scope the variables too. As was said by Dee, declare the variables in the calling page and it should work.

提交回复
热议问题