RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomPageDispatcher.OnPageNotFound Event

Occurs when the dispatcher can't locate a registered Web page module with the name specified in an HTTP request message.

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

Write an OnPageNotFound event handler to generate a response when the dispatcher can't locate the Web page module to which an HTTP request message is addressed. For example, an OnPageNotFound event handler can provide the response object with content that indicates that the requested page does not exist or that represents simple content for a page that does not have an associated Web page module. 

If the OnPageNotFound event handler sets its Handled parameter to true, the page dispatcher assumes it has updated the response message and returns it. If the OnPageNotFound leaves the Handled parameter set to false, the dispatcher raises an EPageDispatcherException exception after the event handler exits.

Tip: To access the Web request and response objects from within an OnPageNotFound event handler, call the global WebContext function to access the Web context and read its Request and Response properties.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!