Execute
The Execute subroutine is the most powerful feature
of the Active Server Pages language. It allows you to pass
a block of ASP code as a string to the ASP engine. The scripting
engine will evaluate and process all of the code within the
current context of the script.
This means that you can store program code in a variable as
a character string. This string can be built dynamically or
stored in a database (encrypted if you wish) and executed
where needed on your pages.
This subroutine does not return any value but may modify some
of the local variables and objects depending on the code that
is processed.
Individual statements may be separated by colons (:) or line
breaks (vbCrLf) in the code parameter.
Dim sCode
sCode = "Dim sDate : sDate = Now() : Response.Write sDate" Execute sCode
sCode = "Dim sDate" & vbCrLf & "sDate = Now()" & vbCrLf & "Response.Write sDate" Execute sCode
|
 |

|