Showing posts with label Page Directive. Show all posts
Showing posts with label Page Directive. Show all posts

Monday, August 11, 2008

Asp.net Directive :Page

Page Directive defines Page specific attributes, which help to get command over customization of .aspx page.

Main Attributes are

Async

Makes page enable for asynchronous handler. Default value is false.

AsyncTimeOut

It defines the time-out (in seconds) used for asynchronous processes. The default time out is 45 seconds.Value must be in integer.

AspCompat

A 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+ version 1.0 components that require access to unmanaged Active Server Pages (ASP) built-in objects. default is false.

AutoEventWireup

Indicates whether the page's events are autowired. true if event autowiring is enabled; otherwise, false.

ClassName

A string that specifies the name of the page class that will be dynamically compiled when the page is requested.

CodeFile


S
pecifies a path to the referenced code-behind file for the page.

Culture

Indicates the culture setting for the page. The value of this attribute must be a valid culture ID.

Debug
Indicates whether the page should be compiled with debug symbols.

EnableEventValidation

Validate events in postback and callback scenarios. true if events are being validated; otherwise, false. The default is true.

It reduces the risk of unauthorized postback requests and callbacks. When the enableEventValidation property is set to true, ASP.NET allows only the events that can be raised on the control during a postback request or callback.

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.
EnableTheming
Indicates whether themes are used on the page. true if themes are used; otherwise, false. The default is true.

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 true.
A view-state MAC is an encrypted version of 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. Note that setting this attribute to true affects performance, because the variable value must be decrypted and encrypted for each round trip of the page.
ErrorPage

Defines a target URL for redirection if an unhandled page exception occurs.

MaintainScrollPositionOnPostback

Maintain user at same position in the client browser after postback. true if users should be returned to the same position; otherwise, false.

SmartNavigation
Indicates whether the page supports the smart navigation feature of Internet Explorer 5.5 or later. true if smart navigation is enabled; otherwise, false. The default is false.
Theme

Specifies a valid theme identifier to use on the page. When the Theme attribute is set without using the StyleSheetTheme attribute, it overrides individual style settings on controls, enabling you to create a unified and consistent look on a page.
Title
Specifies a title for the page which will rendered as a html title tags in the response. The title can also be accessed programmatically as a property of the page.
Transaction

Tells that transactions are supported on the page. Probable values are Disabled, NotSupported, Supported, Required, and RequiresNew. The default is Disabled.

ValidateRequest

This attributes determines request validation should occur. If true, request validation ensure all input data against a hard-coded list of malicious values If a match occurs, an HttpRequestValidationException exception is thrown.
The default is true.
This feature is enabled in the machine configuration file (Machine.config). You can disable it in your application configuration file (Web.config) or on the page by setting this attribute to false.


I hope this will help you.

Source :MSDN,dotnetspider,Forums.asp.net.