How  ASP Works


When a user requests a Web page that ends with the extension .asp, the browser requests the ASP file from the Web server. The Web server processes the requested file sequentially (top-down), executes any script commands contained in the file, and produces an HTML Web page.

The result, which is pure HTML code, is sent back to the browser. Because the script runs on the server, the Web server does all of the processing and standard HTML pages can be generated and sent to the browser. This means that your Web pages are limited only by what your Web server supports.

Another benefit of having your script reside on the server is that the user cannot "view source" on the original script and code. Instead, the user sees only the generated HTML as well as non-HTML content, such as XML, on the pages that are being viewed. The following example illustrates how an ASP page is processed and rendered.