The Microsoft Internet Information Server is a web server that supports the standard Unix web-server scripting technique called the Common Gateway Interface (CGI). In addition to CGI, IIS also supports Active Server Pages (ASP), which use Active Scripting to implement a richer scripting model than offered by CGI.
Active Server Pages uses a scheme to embed the script code that is
similar to Internet Explorer. Code is still delimited with
<SCRIPT> tags, but the tag has a
RunAt=Server attribute added. For example:
<SCRIPT RunAt=Server Language=Python> # This code will run at the server </SCRIPT> <SCRIPT Language=Python> # This code will run at the client </SCRIPT>
Although this sounds simple, the complication again is that the
object model exposed by ASP is quite different to that exposed by IE.
If you attempt to call the
function, your code fails as
alert() doesn’t exist in the ASP object
In addition to using
<SCRIPT> tags, ASP
allows alternative forms delimited by
<%= %> tags. Script code delimited by
%> tags are almost
identical to those delimited by
<%= %> tag allows you to specify
arbitrary Python expressions, and the result of the expression is
replaced in the output. For example, if ASP encounters HTML of the
Hello <%= name %>
The value of the
name variable is printed in the
output sent to the client.
The source files for Active Server Pages are stored as .asp files, although for all intents ...