AspCompat |
When set to true, this allows the page to be executed on a single-threaded apartment ( STA ) thread. This allows the page to call STA components, such as a component developed with Microsoft® Visual Basic 6.0. Setting this attribute to true also allows the page to call COM+ 1.0 components that require access to the unmanaged Active Server Pages ( ASP ) built-in objects. These are accessible through the ObjectContext object or the OnStartPage method. The default is false.
NOTE: Setting this attribute to true can cause your page’s performance to degrade. |
AutoEventWireup |
Indicates whether the page’s events are autowired. true if event auto wiring is enabled; otherwise, false. The default is true. |
Buffer |
Determines if HTTP response buffering is enabled. true if page buffering is enabled; otherwise, false. The default is true. |
ClassName |
Specifies the class name for the page that will by automatically compiled dynamically when the page is requested. This value can be any valid class name. |
ClientTarget |
Indicates the target user agent for which ASP.NET server controls should render content. This value can be any valid user agent or alias. |
CodePage |
Indicates the code page value for the response.
NOTE: If you created your Web Forms page using a code page other than the default code page of the Web server on which the page will run, you must set this attribute. The value you enter should be the code page for the computer on which you created the page. For more information about code pages, search the Microsoft® Developers Network ( MSDN ) at http://msdn.microsoft.com. |
CompilerOptions |
Any compiler string that indicates compilation options for the page. |
ContentType |
Defines the HTTP content type of the response as a standard MIME type. Supports any valid HTTP content type string. For a list of possible values, visit http://www.microsoft.com/technet and search for MIME. |
Culture |
Indicates the culture setting for the page. For information about culture settings and possible culture values, see the CultureInfo class. |
Debug |
Indicates whether the page should be compiled with debug symbols. true if the page should be compiled with debug symbols; otherwise, false. |
Description |
Provides a text description of the page. This value is ignored by the ASP.NET parser. |
EnableSessionState |
Defines session-state requirements for the page. true if session state is enabled; ReadOnly if session state can be read but not changed; otherwise, false. The default is true. These values are case insensitive. For more information, see Session State. |
EnableViewState |
Indicates whether view state is maintained across page requests. true if view state is maintained; otherwise, false. The default is true. |
EnableViewStateMac |
Indicates that ASP.NET should run a machine authentication check ( MAC ) on the page’s view state when the page is posted back from the client. true if view state should be MAC checked; otherwise, false. The default is false.
NOTE: A view state MAC is an encrypted version the hidden variable that a page’s view state is persisted to when sent to the browser. When you set this attribute to true, the encrypted view state is checked to verify that it has not been tampered with on the client.
|
ErrorPage |
Defines a target URL for redirection if an unhandled page exception occurs. |
Explicit |
Indicates that the page should be compiled using the Visual Basic Option Explicit mode. true if option explicit is enabled; otherwise, false. The default is false. |
Inherits |
Defines a code-behind class for the page to inherit. Can be any class derived from the Page class. For information about code-behind classes, see Web Forms Code Model. |
Language |
Specifies the language used when compiling all inline rendering ( <% % > and <%= % > ) and code declaration blocks within the page. Values can represent any .NET-supported language, including Visual Basic, C#, or JScript.NET. |
LCID |
Defines the locale identifier for the Web Forms page.
NOTE: The locale identifier is a 32-bit value that uniquely defines a locale. ASP.NET uses the default locale of the Web server unless you specify a different locale for a Web Forms page by using this attribute. For more information about locales, search MSDN. |
ResponseEncoding |
Indicates the response encoding of page content. Supports values from the Encoding.GetEncoding method. |
Src |
Specifies the source file name of the code-behind class to dynamically compile when the page is requested. You can choose to include programming logic for your page either in a code-behind class or in a code declaration block in the .aspx file.
NOTE: RAD designers, such as Visual Studio.NET, do not use this attribute. Instead, they precompile code-behind classes and then use the Inherits attribute. |
Strict |
Indicates that the page should be compiled using the Visual Basic Option Strict mode. true if option strict is enabled; otherwise, false. The default is false. |
Trace |
Indicates whether tracing is enabled. true if tracing is enabled; otherwise, false. The default is false. |
TraceMode |
Indicates how traces messages are to be displayed for the page when tracing is enabled. Possible values are SortByTime and SortByCategory. The default, when tracing is enabled, is SortByTime. For more information about tracing, see ASP.NET Trace Functionality. |
Transaction |
Indicates whether transactions are supported on the page. Possible values are NotSupported, Supported, Required, and RequiresNew. The default is NotSupported. |
WarningLevel |
Indicates the compiler warning level at which you want the compiler to abort compilation for the page. Possible values are 0 through 4. For more information, see the CompilerParameters.WarningLevel Property property. |
This directive can only be used in Web Forms pages. You can only include one @ Page directive per .aspx file. To define multiple attributes for the directive, use a space-separated list ( do not include a space on either side of the equals sign of a specific attribute, as in trace = "true"
).
The following code instructs the ASP.NET page compiler to use Visual Basic as the inline code language and sets the default HTTP MIME ContentType
transmitted to the client to "text/xml"
.