With AutoEventWireUp
set to false, I would normally set a Page_Finalize
like this:
Include(Self.LoadComplete, Self.Page_Finalize); //Delphi
LoadComplete
however, doesn't seem to be available on a MasterPage and my Page_Finalize
obviously doesn't get called.
What am I meant to do to free objects in the master page?
Thanks.
LoadComplete
method is simply not a member of MasterPage
, but of Page
.
There are several reasons for this, including the fact that the orchestrator of page life cycle is Page
class itself.
It has three event-related methods: PreLoad
, Load
, LoadComplete
. During Load
, the Load
event of children controls is triggered.
While a master page contains (by means of layout) the contents of the page, the page contains the MasterPage
by means of objects, since the Page
is the IHttpHandler
that responds to HTTP requests in ASP.NET.
Briefly, you cannot override (I don't know Delphi, is that some kind of override?) OnLoadComplete
in MasterPage
as it's not defined. Only OnLoad
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With