to Active Server Pages, Web Forms are text files
consisting of HTML tags and other controlling tags such as directives
and script blocks. The default extension for web forms is
; however, you can use the IIS
administration tool to map other file extensions explicitly with
aspnet_isapi.dll to have them parsed and
compiled when accessed, as if they were ASP.NET resources.
There are ten different syntax elements in ASP.NET; because most of them are carried over from ASP, we list here the familiar ones and discuss only those that are important in ASP.NET:
|Code declaration blocks|
|Code rendering blocks|
|HTML control syntax|
|Custom control syntax|
|Server-side object tags|
|Server-side include directives|
ASP directives were formatted as
%> because there was only one type of
ASP.NET adds a number of directives to ASP.NET files. With the new
list of directives—Page, Control, Import, Register, Assembly,
and OutputCache—the syntax for directive is now
%>. All of the old ASP directives are
attributes under the Page directive. If you use the old syntax by
omitting the directive name, the attribute/value pairs will be
applied to the default directive, which is Page.
In addition to containing all previous ASP directives (CodePage, EnableSessionState, Language, LCID, and Transaction), the ASP.NET ...