On a regular aspx
page, I have events such as Page_Init
, Page_Unload
, etc., which occur in a well-defined order.
I have an asmx
page providing [WebMethod()]
s. Do similar events exist? In particular, some events that allow me to initialize some data (like Page_Load
) and do some clean-up (like Page_Unload
) would be extremely useful.
(As far as I can tell, the constructor of the asmx
code-behind class seems to be called on every WebMethod request, i.e., a new instance is created for every WebMethod request, but this is just an observation and not something I've found documented somewhere...)