RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomWebDispatcher.DoAfterDispatch Method

Generates an AfterDispatch event and returns a value that indicates whether the Web application can send the response.

Pascal
function DoAfterDispatch(Request: TWebRequest; Response: TWebResponse): Boolean;
C++
__fastcall Boolean DoAfterDispatch(TWebRequest Request, TWebResponse Response);

Applications cannot call DoAfterDispatch. The DispatchAction method calls DoAfterDispatch after sending the HTTP request message to any matching action items. The DispatchAction method does not call DoAfterDispatch if the HTTP request message was not handled by the action items or by a BeforeDispatch event handler. DoAfterDispatch is also not called if the message was already sent back to the Web client.  

If the AfterDispatch event handler indicates that the response should not be sent, DoAfterDispatch returns false, and the Web application drops the connection without sending the response message. Otherwise, DoAfterDispatch returns true, and the Web application sends the response message if it was not sent from within the AfterDispatch event handler. 

 

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