Previous Section Table of Contents Next Section

About ASP

ASP was first introduced with Internet Information Server 3.0 (IIS 3.0), and exists in subsequent versions of IIS. It's important that you make a distinction between ASP and ASP.NET. ASP is Microsoft's original server-side scripting model, whereas ASP.NET is a completely new, .NET Framework-based technology that has nothing to do with scripting at all. IIS 5.0 and 6.0 support ASP.NET, and both of them support running both ASP and ASP.NET applications within the same Web site. Although ASP.NET is a powerful, high performance way to write Web applications, it's a bit outside the scope of administrative scripting. For instance, it doesn't use VBScript; so-called "Classic" ASP does. So, for the purposes of this book, I'll focus on the older ASP technology.

ASP is not a programming language, although that is a popular misconception. ASP is simply a specialized object model and a specialized host for VBScript. The ASP object model allows you to access information that users type into HTML input forms, and allows you to write output to HTML pages. In fact, ASP isn't particularly high-tech or fancy (although it was pretty innovative when it was introduced).

To get started with ASP, consider a basic HTML Web page.


<HTML>

<BODY>

<FORM ACTION="display.asp" METHOD="POST">

Computer name: <INPUT TYPE="TEXT" NAME="COMPUTERNAME"><BR>

<INPUT TYPE="SUBMIT">

</FORM>

</BODY>

</HTML>

Type this HTML code into Notepad and save the file as Display.asp. The file needs to be located within an IIS folder, such as C:\Inetpub\Wwwroot. If you've got the file in the correct place, you should be able to select Run from the Start menu, type http://localhost/display.asp, and see a small Web page that says "Computer name:" and has a text box and a Submit button.

Is this ASP? Not really. This is just HTML-the Web page doesn't actually do anything if you click the Submit button. You could create a page like this with any HTML editor, such as Microsoft FrontPage. In fact, I usually use FrontPage to work with ASP. You can also use higher-end script editors like PrimalScript, because they understand both ASP tags and HTML code.

Getting Ready for Web Scripting

For this chapter and the three that follow, I'm going to assume your computer is set up to run ASP pages. You'll need a Windows 2000, Windows Server 2003, or Windows XP computer with IIS installed. You'll also need to ensure that ASP is enabled; this is the default for Windows 2000 and Windows XP, but you'll have to explicitly enable ASP in Windows Server 2003.

You should also know where the IIS root folder is. Generally, that's in C:\Inetpub\Wwwroot; you can check the properties of the Default Web Site in the Internet Services Manager console to see where the root folder is located on your computer. I'll have you place all of the sample Web pages in that root folder.

To access the Web pages you create, you need a Web browser. I use Internet Explorer, but due to the nature of ASP, you can use just about any browser you like. You should be able to point the browser to http://localhost/pagename.asp to access the various pages I'll have you create (where pagename.asp is the name of the page as saved on your computer's disk).

Finally, you may want to use a WYSIWYG (what you see is what you get) HTML editor like Microsoft FrontPage. You can use this to create your basic HTML pages (the pages I'll show you how to create will be basic indeed), rather than hand-coding the HTML tags.


    Previous Section Table of Contents Next Section