I am creating a custom control and I need to handle some logic AFTER LoadViewState
(which may or may not be called depending on if the control was visible or not) and BEFORE LoadPostBack
(which may or may not be called depending on if the control was visible or not).
Is there anything in the control lifecycle that will accommodate this?.
I need this because I want to do some processing if the view state WAS NOT loaded. I don't want to do it in init because I would do it there, then potentially have to do it again when the view state is loaded.
So I need to be able to run code when the view state is not loaded (a.k.a when LoadViewState is not called) AND AT THE SAME PLACE in the life-cycle of the control (after Init
, before LoadPostData
)