Platform SDK: CDO 1.2.1 |
The purpose of CDO Rendering is to generate displayable output from CDO objects and properties. The output is sent in Hypertext Markup Language (HTML) to a Web browser and is generated from objects and properties referenced in an .ASP file invoked by the browser. This process is known as HTML rendering.
An .ASP file is a specialized HTML file containing hypertext, client-side script, and Active Server Pages (ASP) script for a Web page. The script can instantiate objects, call their methods, manipulate their properties, and produce results relating to the Web page. Client-side script is decoded and run by the browser itself. ASP script is decoded and run by Microsoft® Internet Information Server (IIS) to supply Web pages to the browser.
Both client-side and ASP script can be written in any scripting language, such as Microsoft® Visual Basic® Scripting Edition (VBScript), JScript™, or JavaScript. Script can be inserted anywhere in an HTML document, that is, anywhere between the <HTML> and </HTML> tags.
Client-side script is delineated by the <SCRIPT> and </SCRIPT> tags. The scripting language's compiler or interpreter is invoked by the browser. Client-side script typically responds to input from the browser's user. For example, it can create and send an e-mail message when the user clicks a button. For more information on client-side script, see Web Page Support.
ASP script can be delineated by either the <% and %> tags or the <SCRIPT RUNAT=SERVER> and </SCRIPT> tags. The compiler or interpreter is invoked by an IIS component before the document is sent to the browser. ASP script uses the CDO Rendering Library to perform HTML rendering. It can, for example, prepare a displayable rendition of a folder. ASP script is not sent to the browser, but instead is used to generate hypertext that is sent in its place.
ASP script can be embedded within client-side script. This is useful, for example, when an exception condition occurring at the server needs to be displayed at the browser. You can only use one level of embedding, and you must delineate your embedded ASP script with the <% and %> tags.
If the browser invokes a Uniform Resource Locator (URL) specifying an .HTM file, IIS sends the file to the browser without modification, just as any Web server does. If, however, the URL specifies an .ASP file, IIS first searches it for any ASP script. If there is none, the file is treated as a normal .HTM file and sent directly to the browser. If IIS does find ASP script, it calls the appropriate compiler or interpreter to execute the script and generate HTML hypertext. IIS then replaces the script with the hypertext and sends the result to the browser as if it were an .HTM file. Note that when ASP script is executed the server does not retain any persistent file containing the exact stream sent to the browser.