Intro to ASP Scripting

As mentioned earlier, we will be using VBScript in all our examples. With that in mind, the first thing we will be putting in our ASP pages is the Language declaration tag. This tag tells the server, and anyone else who opens the script in a text editor, that we are using VBScript in the page. This is not a necessity in the page, but it is good practice to have it. It looks like this:


Notice the @Language at the beginning of the tag, right after the opening server-side language tag. This is a specific property of the ASP page for declaring the coding language.

The next tag that will also be in every one of our ASP pages is the Option Explicit tag. This tag will state that all variables must be declared in the ASP page before they can be instantiated. This tag looks like this:

 <%Option Explicit%> 

When the preceding tag is present, variables must be declared with a Dim statement, like this:

 Dim myVar1, myVar2 

Again, this tag is not necessary in your ASP pages, but it is good practice to have it.

Because ASP is a server-side language, it will not simply display the information (or send the information back to Flash, which is our ultimate goal). For this reason, we will be using the Write method of the Response object, like this:

 Response.Write("text here") 

Macromedia Flash Professional 8 Unleashed
Macromedia Flash Professional 8 Unleashed
ISBN: 0672327619
EAN: 2147483647
Year: 2005
Pages: 319 © 2008-2017.
If you may any questions please contact us: