.NET Samples - ASP.NET Web Forms Syntax Reference

This section includes the following samples:

Reference2 Sample

Reference6 Sample

Reference5 Sample

Reference8 Sample

Reference3 Sample

Reference4 Sample

Reference1 Sample

Reference7 Sample

Reference2 Sample

This sample demonstrates how a method can be declared within a <script runat="server"> block, and then invoked from the page.

Namespaces used in this sample:

(none)

Classes used in this sample:

(none)

Reference6 Sample

This sample demonstrates how the object tag can be used to create an instance of an ArrayList class. Object tags enable page developers to declare and create instances of variables using a declarative, tag-based syntax.

Namespaces used in this sample:

System; System.Collections

Classes used in this sample:

Page; Container; ArrayList; Array; Object; EventArgs

Reference5 Sample

This sample demonstrates the syntax for placing data-binding expressions in ASP.NET pages.

Namespaces used in this sample:

(none)

Classes used in this sample:

ArrayList; Array; Page; Container; Object; EventArgs

Reference8 Sample

This sample demonstrates how server-side #include directives enable developers to insert the raw contents of a specified file anywhere within an ASP.NET page.

Namespaces used in this sample:

(none)

Classes used in this sample:

File; Page; Header

Reference3 Sample

This sample demonstrates the syntax for declaring and using ASP.NET server controls.

Namespaces used in this sample:

(none)

Classes used in this sample:

Message; Page; Object; EventArgs

Reference4 Sample

This sample demonstrates the syntax for declaring and using HTML server controls.

Namespaces used in this sample:

(none)

Classes used in this sample:

Message; Page; Object; EventArgs

Reference1 Sample

This sample demonstrates how to use code rendering blocks to loop over HTML content. Code rendering blocks are denoted with <% ... %> elements, allow you to custom-control content emission, and execute during the render phase of Web Forms page execution.

Namespaces used in this sample:

(none)

Classes used in this sample:

Page

Reference7 Sample

This sample demonstrates how server-side comments enable page developers to prevent server code (including server controls) and static content from executing or rendering.

Namespaces used in this sample:

(none)

Classes used in this sample:

Page