4Introduction to ASP What is ASP? ASP stands for Active Server Pages. ASP is a program that runs inside IIS.IIS stands for Internet Information Services.ASP is Microsoft’s solution to building advanced Web sites.
5Introduction to ASP How Does ASP Differ from HTML? HTML file generates static pages, but ASP file generates dynamic pages.HTML file has the extension .html/.htm, but ASP file has the extension .aspWhen a browser sends a requests to the web server for an HTML file the server returns the file as it is to the browser, but when a browser sends a request to the web server for an ASP file, IIS passes the request to the ASP engine having a special program ASP.dll. This ASP file is processed line by line and executes the server side scripts(<% %>) in the file. Finally, the ASP file is returned to the browser as plain HTML.
6Browser Request Web Server HTML File Memory-HTML file Introduction to ASPProcessing of an HTML PageBrowserRequestWeb ServerSteps involved in HTML page Processing are:A user enters request for Web Page in browser.The browser sends the request for the web page to web server such as IIS.The web server receives the request and recognizes that the request is for an HTML file by examining the extension of the requested file (.Html or .htm )The Web Server retrieves the proper HTML file from disk or memory and sends the file back to the browser.The HTML file is interpreted by the user’s browser and the results are displayed in the browser window.HTML FileMemory-HTML file
7Browser Request Web Server Processing Memory-ASP File HTML File Introduction to ASPProcessing of an ASP PageBrowserRequestWeb ServerASP page processing Steps:A user enters request for Web Page in browser.The browser sends the request for the web page to web server such as IIS.The web server receives the request and recognizes that the request is for an ASP file by examining the extension of the requested file (.asp)The Web Server retrieves the proper ASP file from disk or memory.The Web Server sends the file to a special program named ASP.dllThe ASP file is processed from top to bottom and converted to a Standard HTML file by ASP.dll.The HTML file is sent back to the browser.The HTML file is interpreted by the user’s browser and the results are displayed in the browser window.ProcessingMemory-ASP FileHTML File
8Introduction to ASP What can ASP do for you? ASP file generates dynamic web pages displaying different contents for different users and at different times of the day.Responds to user’s queries or data submitted from HTML forms.Accesses any data or databases and return the results to a browser.Customizes a Web page to make it more useful for individual users.The advantages of using ASP instead of CGI and Perl, are those of simplicity, speed and it minimizes the network traffic.
10ASP Syntax The Basic Syntax Rule An ASP file normally contains HTML tags, just as a standard HTML file.In addition, an ASP file can contain server side scripts, surrounded by the delimiters <% and %>. Server side scripts are executed on the server, and can contain any expressions, statements, procedures, or operators that are valid for the scripting language you use.
<% For i=1 to 10. sayhello() Next. %>