Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Directives specify settings that are used by the page and user-control compilers when the compilers process ASP.NET Web Forms pages (.aspx files) and user control (.ascx) files.
ASP.NET treats any directive block (<%@ %>) that does not contain an explicit directive name as an @ Page directive (for a page) or as an @ Control directive (for a user control).
For syntax information and descriptions of the attributes that are available for each directive, use the links that are listed in the following table.
Directive |
Description |
---|---|
Links an assembly to the current page or user control declaratively. |
|
Defines control-specific attributes used by the ASP.NET page parser and compiler and can be included only in .ascx files (user controls). |
|
Indicates that a page or user control implements a specified .NET Framework interface declaratively. |
|
Imports a namespace into a page or user control explicitly. |
|
Identifies a page as a master page and defines attributes used by the ASP.NET page parser and compiler and can be included only in .master files. |
|
Defines the class or virtual path used to type the Master property of a page. |
|
Controls the output caching policies of a page or user control declaratively. |
|
Defines page-specific attributes used by the ASP.NET page parser and compiler and can be included only in .aspx files. |
|
Creates a strongly typed reference to the source page from the target of a cross-page posting. |
|
Links a page, user control, or COM control to the current page or user control declaratively. |
|
Associates aliases with namespaces and classes, which allow user controls and custom server controls to be rendered when included in a requested page or user control. |
See Also
Concepts
ASP.NET Web Page Syntax Overview