Introduction to ASP
So you want to learn ASP? You may already know a markup language such as HTML or some scripting language such as as Javascript and you want to move onto something more interactive, or you may have heard about ASP and are curious about it, or one of many other reasons. Whatever your reason(s) may be, ASP is great to learn!
This lesson focuses on:
- What you should already know
- What is ASP?
- What ASP is not
- ASP file extensions
- What can be done with ASP?
What you should already know
Before beginning your studies of ASP, you should already have at least a basic understanding of:
-
HTML/XHTML
ASP scripts are placed on webpages with HTML/XHTML tags and without knowing these tags, you will not know where and how to place ASP scripts on a webpage. If you need to study HTML, visit our HTML section. If you need to study XHTML, visit our XHTML section.
-
Javascript and/or VBScript
ASP is a technology that incorporates Javascript and VBScript, so knowing these languages is essential to being able to write ASP code. If you need to study Javascript, visit our Javascript section. If you need to study VBScript, visit our VBScript section.
What is ASP?
ASP stands for Active Server Pages and it is a Microsoft technology.
ASP can be a little confusing to the beginner at first because of the concept behind it. ASP is NOT a language, but a technology. HTML, CSS, Javascript, VBScript -- these exist as separate languages, while ASP is a special technology that incorporates several scripting languages such as Javascript and VBScript into itself and allows for the use of them.
NOTE: ASP runs on the server-side. This means that a web server, not a web browser, executes the ASP code. So a web browser that displays the ASP files of a website does not necessarily have to support scripting as the server takes care of that part when it comes to ASP! Other server-side scripting languages include PERL and PHP. Learn more about the different type of computer languages at our computer languages lesson.
What ASP is not
As stated above, ASP is NOT a language, but a technology. Some people refer to it as a language, and when they do they usually mean a language that runs server-side VBScript code since VBScript is the default language used by ASP.
ASP file extensions
ASP documents have a file extension of .asp
What can be done with ASP?
There is alot you can do with ASP:
-
Get data from forms
You can get data from forms submitted by users. For example, you can have users submit their e-mail addresses to be added to a mailing list.
-
Read and write cookies
A cookie is a small text file stored by a website on a users hard drive. With ASP, you can create cookies to store on a users hard drive and later read them. For example, you can store a users preference for the background color of a webpage in a cookie, and every time the user visits your website again you can read the cookie that stores this value and set the background color to the users preference accordingly.
-
Read from and write to files
You can read from and write to files. For example, you can create a guestbook on your website that is stored in a text file, and you can let users sign or view the guestbook.
-
Implement sessions
A session is a way to store information about what happens during a users visit to a website. Through this mechanism, you can store information about the user such as at what time they visited a page.
-
Communicate with databases
Read data stored in a database or write new data to a database. For example, you can store a users name and e-mail address in a database, and allow them to retrieve this information and view it or change it, and the change will be reflected in the database.




