When does web control events fire

  • Thread starter Thread starter ryu
  • Start date Start date
R

ryu

I have a aspx page that loads a ascx file ie Web Control. My question is
when does the postback of the web control occur? Is it when it is called via
LoadControl? Or after the calling page's postback or is it random?
 
Right now I have some information that I stored in Session State. I would
like to remove these data after finishing with the control. However this
control may be loaded more than once. Therefore I need to know when I should
remove the Session State. Is it in the for loop I use to load the control or
after? When I put it after the for loop the control will return after an
error because the Session State has already been removed. When should I
remove the Session State?
 
All I can tell you is, if you want to remove something from Session, remove
it after you don't need it any more.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
ryu said:
I have a aspx page that loads a ascx file ie Web Control. My question is
when does the postback of the web control occur? Is it when it is called via
LoadControl? Or after the calling page's postback or is it random?


Set the Trace property of the Pagedirective (<@Page ... >) to True and
you'll find it out in the trace tree.

//Rutger
 
Back
Top