Class PageRequestManager

Manages client partial-page updates of server UpdatePanel controls. In addition, defines properties, events, and methods that can be used to customize a Web page with client script.

see

{@link http://msdn.microsoft.com/en-us/library/bb311028(v=vs.100).aspx}

Index

Constructor methods

Methods

Constructor methods

constructor(): PageRequestManager

Initializes a new instance of the Sys.WebForms.PageRequestManager Class.

Returns

PageRequestManager

Methods

public abortPostBack()

Stops all updates that would occur as a result of an asynchronous postback. The abortPostBack method stops the currently executing postback. To cancel a new postback, provide an event handler for the initializeRequest event and use the cancel event of the Sys.CancelEventArgs class.

public add_beginRequest(beginRequestHandler: (sender: any, args: Sys.WebForms.BeginRequestEventArgs) => void)

Raised before the processing of an asynchronous postback starts and the postback request is sent to the server.

Parameters

  • beginRequestHandler: (sender: any, args: Sys.WebForms.BeginRequestEventArgs) => void
              The name of the handler method that will be called.
    

public add_endRequest(endRequestHandler: (sender: any, args: Sys.WebForms.EndRequestEventArgs) => void)

Raised after an asynchronous postback is finished and control has been returned to the browser.

Parameters

  • endRequestHandler: (sender: any, args: Sys.WebForms.EndRequestEventArgs) => void
              The name of the handler method that will be called.
    

public add_initializeRequest(initializeRequestHandler: (sender: any, args: Sys.WebForms.InitializeRequestEventArgs) => void)

Raised during the initialization of the asynchronous postback.

Parameters

  • initializeRequestHandler: (sender: any, args: Sys.WebForms.InitializeRequestEventArgs) => void
              The name of the handler method that will be called.
    

public add_pageLoaded(pageLoadedHandler: (sender: any, args: Sys.WebForms.PageLoadedEventArgs) => void)

Raised after all content on the page is refreshed as a result of either a synchronous or an asynchronous postback.

Parameters

  • pageLoadedHandler: (sender: any, args: Sys.WebForms.PageLoadedEventArgs) => void
              The name of the handler method that will be called.
    

public add_pageLoading(pageLoadingHandler: (sender: any, args: Sys.WebForms.PageLoadingEventArgs) => void)

Raised after the response from the server to an asynchronous postback is received but before any content on the page is updated.

Parameters

  • pageLoadingHandler: (sender: any, args: Sys.WebForms.PageLoadingEventArgs) => void

public beginAsyncPostBack(updatePanelsToUpdate?: Array<string>, eventTarget?: string, eventArgument?: string, causesValidation?: boolean, validationGroup?: string)

Begins an asynchronous postback.

Parameters

  • updatePanelsToUpdate?: Array<string> optional
                  (Optional) An array of UniqueID values or ClientID values for UpdatePanel controls that must be re-rendered.
    
  • eventTarget?: string optional
                  (Optional) A string that contains the target of the event.
    
  • eventArgument?: string optional
                  (Optional) A string that contains an argument for the event.
    
  • causesValidation?: boolean optional
                  (Optional) true to cause validation.
    
  • validationGroup?: string optional
                  (Optional) A string that contains the name of the validation group.
    

public dispose()

Releases ECMAScript (JavaScript) resources and detaches events. the dispose method to free client resources. The PageRequestManager instance calls the dispose method during the window.unload event of the browser. If you call the dispose method and then reference members of the PageRequestManager class, an error occurs. In typical page developer scenarios, you do not have to call the dispose method.

public static getInstance(): PageRequestManager

Returns the instance of the PageRequestManager class for the page.

Returns

PageRequestManager

The current instance of the PageRequestManager class. You do not create a new instance of the PageRequestManager class directly. Instead, an instance is available when partial-page rendering is enabled.

public get_isInAsyncPostBack(): boolean

Returns

boolean

public remove_beginRequest(beginRequestHandler: Function)

Raised before the processing of an asynchronous postback starts and the postback request is sent to the server. @param beginRequestHandler The handler method that will be removed.

Parameters

  • beginRequestHandler: Function

public remove_endRequest(endRequestHandler: (sender: any, args: Sys.WebForms.EndRequestEventArgs) => void)

Raised after an asynchronous postback is finished and control has been returned to the browser.

Parameters

  • endRequestHandler: (sender: any, args: Sys.WebForms.EndRequestEventArgs) => void
              The name of the handler method that will be removed.
    

public remove_initializeRequest(initializeRequestHandler: (sender: any, args: Sys.WebForms.InitializeRequestEventArgs) => void)

Raised during the initialization of the asynchronous postback.

Parameters

  • initializeRequestHandler: (sender: any, args: Sys.WebForms.InitializeRequestEventArgs) => void
              The name of the handler method that will be called.
    

public remove_pageLoaded(pageLoadedHandler: (sender: any, args: Sys.WebForms.PageLoadedEventArgs) => void)

Raised after all content on the page is refreshed as a result of either a synchronous or an asynchronous postback.

Parameters

  • pageLoadedHandler: (sender: any, args: Sys.WebForms.PageLoadedEventArgs) => void
              The name of the handler method that will be called.
    

public remove_pageLoading(pageLoadingHandler: (sender: any, args: Sys.WebForms.PageLoadingEventArgs) => void)

Raised after the response from the server to an asynchronous postback is received but before any content on the page is updated.

Parameters

  • pageLoadingHandler: (sender: any, args: Sys.WebForms.PageLoadingEventArgs) => void