RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomWebPageModule.OnBeforeDispatchPage Event

Occurs before the Web module calls on the page producer to generate the content of the Web page.

Pascal
property OnBeforeDispatchPage: TDispatchPageHandledEvent;
C++
__property TDispatchPageHandledEvent OnBeforeDispatchPage;

Write an OnBeforeDispatchPage event handler to process an HTTP request message before the Web page module performs the default processing.  

This event can provide an alternate mechanism for handling request messages, and then set the Handled parameter to true to prevent the Web page module from fetching the template file for the page and calling on the page producer to generate the page content. 

If the event handler does not handle the request (for example, if it is merely initializing values that the page producer uses), it can leave the Handled parameter as false and the Web page module will continue with the default processing.

Tip: To access the Web request and response objects from within an OnBeforeDispatchPage event handler, use the Request and Response properties.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!