Getting Started with ASP / PDF

Getting Started with ASP / PDF









Getting Started with ASP / PDF



















1      Getting Started

1.1    Introduction to ASP

Active Server Pages (ASP) lets you create dynamic web pages, and was developed primarily to ease the creation of database-driven web sites.   

ASP is server-side technology.  The user’s browser does no processing of ASP code.  The user’s browser receives equivalent HTML, and any client-side scripts.  ASP code is typically written in JavaScript or VBScript.

ASP processing occurs as follows:
  • User requests an ASP file through a web browser
  • Web server gets the request and loads the ASP file
  • Server processes all the ASP code;  any output from the ASP code is in HTML format
  • Server sends the HTML content to the user’s web browser

ASP code can use databases on the server without a connection from the user’s browser.   ASP code, in conjunction with Microsoft’s ADO (ActiveX Data Objects), can connect to a database, retrieve data, make changes, and manipulate that data in ASP and HTML files. 

Through ADO, ASP can access any database.  ADO uses OLE DB to access data sources.  ADO also supports Open Database Connectivity (ODBC)

ASP is available only for Microsoft operating systems.

1.2    Setup the Environment

Although intended for implementation on a server, ASP code can be tested and executed on any version of Windows 2000 and later.  To do so, you install the latest version of Internet Information Server (IIS) – which has ASP built-in – as a personal web server.   

1.2.1     Protect Your Computer

Microsoft recommends that before loading IIS, you protect your computer by:  1) installing an internet firewall, 2) downloading updates for your computer, and 3) using up-to-date anti-virus software.   You can also download the Microsoft Baseline Security Analyzer, to help you identify any security mis-configurations on your computer.

Numerous security problems were identified for early versions of IIS.  Always use the most recent version, and apply any new patches.  Refer to Microsoft Security Bulletins for additional information. 

1.2.2     Install Internet Information Server (IIS)

Install IIS 5.0 (or later version) on Windows 2000 or XP Professional, by clicking the Windows Component checkbox for IIS.  

Control Panel à  Add/Remove Programs à Add/Remove Windows Components


1.3    Your First Web Site

Now that IIS is installed, you have a new icon in your Administrative Tools, called Internet Services Manager.

1.3.1     Internet Services Manager

Control Panel à  Administrative Tools à  Internet Services Manager

1.1    Your First Code

You can build your ASP files with any simple text editor, including an HTML editor like HomeSite, a programming editor like TextPad, or even a simple editor like NotePad.

You will store your files or reference them via virtual directories in the in the root directory of your web server:  c:\InetPub\wwwroot.

Enter the following sample code in your text editor, and save the file in the root directory of your web server:  c:\InetPub\wwwroot\hello.asp.......








Download Getting Started with ASP / PDF












Getting Started with ASP / PDF


0 commentaires: