An Active Server Page is an HTML page that includes script code that is processed on a web server before the page is sent to the user. In most systems, the HTML (which is always stored on the server) is processed by script code that is also stored by the server using information received from the client browser. The server then builds the page 'on the fly' before sending it to the client. Since ASP just builds a regular HTML page, it can be delivered to any browser.
Here's the essentials of that processing.
1 - A browser sends a request for an ASP page rather than a normal HTML web page.
2 - The server finds the ASP page and runs the ASP code in the page.
3 - After the code runs, the server returns standard HTML back to the browser.
ASP works by doing the heavy lifting on the web server. For example, suppose you want to send a customized calendar (maybe with the latest sales events at your business marked in) to visitors at your page. You can pull the latest information out of a database, combine it with a information from the browser, build a calendar "on the fly" in HTML, and send it back to the browser. The magic part is that you can create the HTML returned to the browser from databases, ActiveX components, Visual Basic …. anything your programming skill can invent!
Let's look at a complete ASP page. The idea is to display a different quote every time someone accesses the page. In most cases, this would probably be done with a database, but if your needs are modest, you can get the same result with a simple VBScript 'CASE' statement.
Note that the script starts the same way that a normal HTML web page would. , , . So far, everything's pretty normal. Then you get this strange
"<%=date%>"
thingy. That's an ASP statement. The server converts that into the server date and plugs it into the same spot in the HTML.