An ASP+ file is a text file that contains markup syntax for coding server-side page logic, dynamic output, and literal content. By default, ASP+ files have the extension .aspx or .aspc (for pagelets); however, ASP+ will parse and compile any file that is mapped to the xspisapi.dll under IIS.
There are ten distinct syntax elements in ASP+:
Directives specify optional settings used by ASP+, such as encoding, transaction semantics, session state requirements, and others.
Code declaration blocks define member variables and methods that will be compiled into the generated NGWS class that represents the page.
Code render blocks define inline or inline expressions that execute when the page is rendered.
HTML server syntax enable page developers to insert and programmatically manipulate HTML elements on a page.
Custom server control syntax insert rich server controls on a page (including user-authored controls and the Web Controls that ship with the NGWS runtime).
Databinding expressions declaratively create bindings between server control properties and data sources.
Server-side object tags declare and instantiate Classic COM and NGWS objects.
Server-side include directives enable developers to insert the raw contents of a specified file anywhere within an ASP+ Page.
Server-side comments prevent server code or static content from executing or rendering.
Any content of an ASP+ file that does not fall into one of the above categories is treated as literal text. This includes string literals and standard HTML. For example, in the following fragment, there are three instances of literal text: "Name:
", "<br>Address:
", and "<br>Telephone:
".
<form id="myform" runat="server"> Name:<input type="text" id="name" runat="server" /> <br>Address:<input type="text" id="address" runat="server" /> <br>Telephone:< <input type="text" id="phone" runat="server" /> </form>
Each contiguous occurrence of literal text is instantiated by the framework as a literalcontrol object and populated into the page's control tree.
See Also