In this tutorial, we will be looking at VBScript (Visual Basic Scripting Language) for Active Server Pages (ASP). In order to let the web server know it must process the VBScript prior to returning the browser's request, the pages with the script must be named with the ".asp" suffix.
Normally when you view a webpage, it is followed by either the ".htm" or ".html" suffices. The server does nothing but find the file and send it to the requesting browser. However, if you name a file: somefile.asp, and place it in your web server's directory, this page will prompt the server to process the included VBScript code, if there is any, prior to "spitting out" the HTML which the browser reads.
Below, you can see a simple example of a VBScript page:
<% Dim strFirstName, strLastName strFirstName = "Joe" strLastName = "User" %> <html> <head> <title>Untitled</title> </head> <body> Hello <% response.write strFirstName & " " & strLastName %> </body> </html>
The above code simply declares two variables, strFirstName and strLastName, and
assigns values to them, Joe and User, respectively. By using the brackets
<% %> this tells the server that the content between them
should be handled prior to any HTML code. Also note that the use of the single
quote "'" denotes comments that help describe the purpose of the nearby code or
function.
Next