Introduction to ASP
This tutorial 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:
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. Check out our HTML tutorials or XHTML tutorials if you are not yet familiar with these languages.
What is ASP?
ASP stands for Active Server Pages and it is a Microsoft technology.
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 different type of computer languages tutorial.
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?
- 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 - 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.
All this and much more can be done with ASP!