System.Web.UI.Page Members

The members of System.Web.UI.Page are listed below.

See Also: Inherited members from System.Web.UI.TemplateControl

Public Constructors

Initializes a new instance of the System.Web.UI.Page class.

Public Fields

const
postEventArgumentIDstring.

A string that defines the EVENTARGUMENT hidden field in the rendered page.

const
postEventSourceIDstring.

A string that defines the EVENTTARGET hidden field in the rendered page.

Public Properties

[read-only]
ApplicationSystem.Web.HttpApplicationState.

Gets the System.Web.HttpApplicationState object for the current Web request.

AsyncTimeoutTimeSpan.

Gets or sets a value indicating the time-out interval used when processing asynchronous tasks.

Bufferbool.

Sets a value indicating whether the page output is buffered.

[read-only]
CacheSystem.Web.Caching.Cache.

Gets the System.Web.Caching.Cache object associated with the application in which the page resides.

[read-only]
ClientQueryStringstring.

Gets the query string portion of the requested URL.

[read-only]
ClientScriptClientScriptManager.

Gets a System.Web.UI.ClientScriptManager object used to manage, register, and add script to the page.

ClientTargetstring.

Gets or sets a value that allows you to override automatic detection of browser capabilities and to specify how a page is rendered for particular browser clients.

CodePageint.

Sets the code page identifier for the current System.Web.UI.Page.

ContentTypestring.

Sets the HTTP MIME type for the System.Web.HttpResponse object associated with the page.

Culturestring.

Sets the culture ID for the System.Threading.Thread object associated with the page.

EnableEventValidationbool.

Gets or sets a value indicating whether the page validates postback and callback events.

override
EnableViewStatebool.

Gets or sets a value indicating whether the page maintains its view state, and the view state of any server controls it contains, when the current page request ends.

EnableViewStateMacbool.

Gets or sets a value indicating whether ASP.NET should check message authentication codes (MAC) in the page's view state when the page is posted back from the client.

ErrorPagestring.

Gets or sets the error page to which the requesting browser is redirected in the event of an unhandled page exception.

[read-only]
FormSystem.Web.UI.HtmlControls.HtmlForm.

Gets the HTML form for the page.

[read-only]
HeaderSystem.Web.UI.HtmlControls.HtmlHead.

Gets the document header for the page if the head element is defined with a runat=server in the page declaration.

override
IDstring.

Gets or sets an identifier for a particular instance of the System.Web.UI.Page class.

[read-only]
IdSeparatorchar.

Gets the character used to separate control identifiers when building a unique ID for a control on a page.

[read-only]
IsAsyncbool.

Gets a value indicating whether the page is processed asynchronously.

[read-only]
IsCallbackbool.

Gets a value that indicates whether the page request is the result of a callback.

[read-only]
IsCrossPagePostBackbool.

Gets a value indicating whether the page is involved in a cross-page postback.

[read-only]
IsPostBackbool.

Gets a value that indicates whether the page is being rendered for the first time or is being loaded in response to a postback.

[read-only]
IsReusablebool.

Gets a value indicating whether the System.Web.UI.Page object can be reused.

[read-only]
IsValidbool.

Gets a value indicating whether page validation succeeded.

[read-only]
ItemsIDictionary.

Gets a list of objects stored in the page context.

LCIDint.

Sets the locale identifier for the System.Threading.Thread object associated with the page.

MaintainScrollPositionOnPostBackbool.

Gets or sets a value indicating whether to return the user to the same position in the client browser after postback. This property replaces the obsolete Page.SmartNavigation property.

[read-only]
MasterMasterPage.

Gets the master page that determines the overall look of the page.

MasterPageFilestring.

Gets or sets the virtual path of the master page.

MaxPageStateFieldLengthint.

Gets or sets the maximum length for the page's state field.

[read-only]
PageAdapterSystem.Web.UI.Adapters.PageAdapter.

Gets the adapter that renders the page for the specific requesting browser.

[read-only]
PreviousPagePage.

Gets the page that transferred control to the current page.

[read-only]
RequestSystem.Web.HttpRequest.

Gets the System.Web.HttpRequest object for the requested page.

[read-only]
ResponseSystem.Web.HttpResponse.

Gets the System.Web.HttpResponse object associated with the System.Web.UI.Page object. This object allows you to send HTTP response data to a client and contains information about that response.

ResponseEncodingstring.

Sets the encoding language for the current System.Web.HttpResponse object.

[read-only]
ServerSystem.Web.HttpServerUtility.

Gets the Server object, which is an instance of the System.Web.HttpServerUtility class.

[read-only]
SessionSystem.Web.SessionState.HttpSessionState.

Gets the current Session object provided by ASP.NET.

SmartNavigationbool.

Gets or sets a value indicating whether smart navigation is enabled. This property is deprecated.

StyleSheetThemestring.

Gets or sets the name of the theme that is applied to the page early in the page life cycle.

Themestring.

Gets or sets the name of the page theme.

Titlestring.

Gets or sets the title for the page.

[read-only]
TraceSystem.Web.TraceContext.

Gets the System.Web.TraceContext object for the current Web request.

TraceEnabledbool.

Sets a value indicating whether tracing is enabled for the System.Web.UI.Page object.

TraceModeValueSystem.Web.TraceMode.

Sets the mode in which trace statements are displayed on the page.

UICulturestring.

Sets the user interface (UI) ID for the System.Threading.Thread object associated with the page.

[read-only]
UserSystem.Security.Principal.IPrincipal.

Gets information about the user making the page request.

[read-only]
ValidatorsValidatorCollection.

Gets a collection of all validation controls contained on the requested page.

ViewStateEncryptionModeViewStateEncryptionMode.

Gets or sets the encryption mode of the view state.

ViewStateUserKeystring.

Assigns an identifier to an individual user in the view-state variable associated with the current page.

override
Visiblebool.

Gets or sets a value indicating whether the System.Web.UI.Page object is rendered.

Protected Properties

AspCompatModebool.

Sets a value indicating whether the page can be executed on a single-threaded apartment (STA) thread.

AsyncModebool.

Sets a value indicating whether the page is processed synchronously or asynchronously.

[read-only]
override
ContextSystem.Web.HttpContext.

Gets the System.Web.HttpContext object associated with the page.

[write-only]
FileDependenciesArrayList.

Sets an array of files that the current System.Web.HttpResponse object is dependent upon.

[read-only]
PageStatePersisterPageStatePersister.

Gets the System.Web.UI.PageStatePersister object associated with the page.

TransactionModeint.

Sets the level of transaction support for the page.

[read-only]
UniqueFilePathSuffixstring.

Gets a unique suffix to append to the file path for caching browsers.

Public Methods

AddOnPreRenderCompleteAsync(System.Web.BeginEventHandler, System.Web.EndEventHandler)

Registers beginning and ending event handler delegates that do not require state information for an asynchronous page.

AddOnPreRenderCompleteAsync(System.Web.BeginEventHandler, System.Web.EndEventHandler, object)

Registers beginning and ending event handler delegates for an asynchronous page.

static
CreateHtmlTextWriterFromType(System.IO.TextWriter, Type) : HtmlTextWriter

Creates a specified System.Web.UI.HtmlTextWriter object to render the page's content.

DesignerInitialize()

Performs any initialization of the instance of the System.Web.UI.Page class that is required by RAD designers. This method is used only at design time.

ExecuteRegisteredAsyncTasks()

Starts the execution of an asynchronous task.

override
FindControl(string) : Control

Searches the page naming container for a server control with the specified identifier.

GetDataItem() : object

Gets the data item at the top of the data-binding context stack.

GetPostBackClientEvent(Control, string) : string

Gets a reference that can be used in a client event to post back to the server for the specified control and with the specified event arguments.

GetPostBackClientHyperlink(Control, string) : string

Gets a reference, with javascript: appended to the beginning of it, that can be used in a client event to post back to the server for the specified control and with the specified event arguments.

GetPostBackEventReference(Control) : string

Returns a string that can be used in a client event to cause postback to the server. The reference string is defined by the specified System.Web.UI.Control object.

GetPostBackEventReference(Control, string) : string

Returns a string that can be used in a client event to cause postback to the server. The reference string is defined by the specified control that handles the postback and a string argument of additional event information.

GetTypeHashCode() : int

Retrieves a hash code that is generated by System.Web.UI.Page objects that are generated at run time. This hash code is unique to the System.Web.UI.Page object's control hierarchy.

GetValidators(string) : ValidatorCollection

Returns a collection of control validators for a specified validation group.

IsClientScriptBlockRegistered(string) : bool

Determines whether the client script block with the specified key is registered with the page.

IsStartupScriptRegistered(string) : bool

Determines whether the client startup script is registered with the System.Web.UI.Page object.

MapPath(string) : string

Retrieves the physical path that a virtual path, either absolute or relative, or an application-relative path maps to.

ProcessRequest(System.Web.HttpContext)

Sets the intrinsic server objects of the System.Web.UI.Page object, such as the Page.Context, Page.Request, Page.Response, and Page.Application properties.

RegisterArrayDeclaration(string, string)

Declares a value that is declared as an ECMAScript array declaration when the page is rendered.

RegisterAsyncTask(PageAsyncTask)

Registers a new asynchronous task with the page.

RegisterClientScriptBlock(string, string)

Emits client-side script blocks to the response.

RegisterHiddenField(string, string)

Allows server controls to automatically register a hidden field on the form. The field will be sent to the System.Web.UI.Page object when the System.Web.UI.HtmlControls.HtmlForm server control is rendered.

RegisterOnSubmitStatement(string, string)

Allows a page to access the client OnSubmit event. The script should be a function call to client code registered elsewhere.

RegisterRequiresControlState(Control)

Registers a control as one whose control state must be persisted.

RegisterRequiresPostBack(Control)

Registers a control as one that requires postback handling when the page is posted back to the server.

RegisterRequiresRaiseEvent(IPostBackEventHandler)

Registers an ASP.NET server control as one requiring an event to be raised when the control is processed on the System.Web.UI.Page object.

RegisterRequiresViewStateEncryption()

Registers a control with the page as one requiring view-state encryption.

RegisterStartupScript(string, string)

Emits a client-side script block in the page response.

RegisterViewStateHandler()

Causes page view state to be persisted, if called.

RequiresControlState(Control) : bool

Determines whether the specified System.Web.UI.Control object is registered to participate in control state management.

SetFocus(string)

Sets the browser focus to the control with the specified identifier.

SetFocus(Control)

Sets the browser focus to the specified control.

UnregisterRequiresControlState(Control)

Stops persistence of control state for the specified control.

Validate()

Instructs any validation controls included on the page to validate their assigned information.

Validate(string)

Instructs the validation controls in the specified validation group to validate their assigned information.

VerifyRenderingInServerForm(Control)

Confirms that an System.Web.UI.HtmlControls.HtmlForm control is rendered for the specified ASP.NET server control at run time.

Protected Methods

AddContentTemplate(string, ITemplate)

Called during page initialization to create a collection of content (from content controls) that is handed to a master page, if the current page or master page refers to a master page.

AddWrappedFileDependencies(object)

Adds a list of dependent files that make up the current page. This method is used internally by the ASP.NET page framework and is not intended to be used directly from your code.

AspCompatBeginProcessRequest(System.Web.HttpContext, AsyncCallback, object) : IAsyncResult

Initiates a request for Active Server Page (ASP) resources. This method is provided for compatibility with legacy ASP applications.

AspCompatEndProcessRequest(IAsyncResult)

Terminates a request for Active Server Page (ASP) resources. This method is provided for compatibility with legacy ASP applications.

AsyncPageBeginProcessRequest(System.Web.HttpContext, AsyncCallback, object) : IAsyncResult

Begins processing an asynchronous page request.

AsyncPageEndProcessRequest(IAsyncResult)

Ends processing an asynchronous page request.

CreateHtmlTextWriter(System.IO.TextWriter) : HtmlTextWriter

Creates an System.Web.UI.HtmlTextWriter object to render the page's content.

DeterminePostBackMode() : System.Collections.Specialized.NameValueCollection

Returns a System.Collections.Specialized.NameValueCollection of data posted back to the page using either a POST or a GET command.

override
FrameworkInitialize()

Initializes the control tree during page generation based on the declarative nature of the page.

GetWrappedFileDependencies(string[]) : object

Returns a list of physical file names that correspond to a list of virtual file locations.

InitializeCulture()

Sets the Page.Culture and Page.UICulture for the current thread of the page.

InitOutputCache(OutputCacheParameters)

Initializes the output cache for the current page request based on an System.Web.UI.OutputCacheParameters object.

InitOutputCache(int, string, string, OutputCacheLocation, string)

Initializes the output cache for the current page request.

InitOutputCache(int, string, string, string, OutputCacheLocation, string)

Initializes the output cache for the current page request.

LoadPageStateFromPersistenceMedium() : object

Loads any saved view-state information to the System.Web.UI.Page object.

override
OnInit(EventArgs)

Raises the Control.Init event to initialize the page.

OnInitComplete(EventArgs)

Raises the Page.InitComplete event after page initialization.

OnLoadComplete(EventArgs)

Raises the Page.LoadComplete event at the end of the page load stage.

OnPreInit(EventArgs)

Raises the Page.PreInit event at the beginning of page initialization.

OnPreLoad(EventArgs)

Raises the Page.PreLoad event after postback data is loaded into the page server controls but before the Control.OnLoad(EventArgs) event.

OnPreRenderComplete(EventArgs)

Raises the Page.PreRenderComplete event after the Page.OnPreRenderComplete(EventArgs) event and before the page is rendered.

OnSaveStateComplete(EventArgs)

Raises the Page.SaveStateComplete event after the page state has been saved to the persistence medium.

RaisePostBackEvent(IPostBackEventHandler, string)

Notifies the server control that caused the postback that it should handle an incoming postback event.

override
Render(HtmlTextWriter)

Initializes the System.Web.UI.HtmlTextWriter object and calls on the child controls of the System.Web.UI.Page to render.

SavePageStateToPersistenceMedium(object)

Saves any view-state and control-state information for the page.

Public Events

InitComplete

Occurs when page initialization is complete.

LoadComplete

Occurs at the end of the load stage of the page's life cycle.

PreInit

Occurs before page initialization.

PreLoad

Occurs before the page Control.Load event.

PreRenderComplete

Occurs before the page content is rendered.

SaveStateComplete

Occurs after the page has completed saving all view state and control state information for the page and controls on the page.