OnEndPage

When the user jumps to another page or closes the current Web page, the server will call the OnEndPage method for all components (except those with application scope) on that page that have implemented the OnEndPage method. The server calls this method before processing the script on that page.

You can use the OnEndPage method to free copies of interfaces stored by the OnStartPage method, and any other resources that do not need to persist beyond script processing.