When does web control events fire

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?
 
R

ryu

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?
 
K

Kevin Spencer

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.
 
R

Rutger Smit

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top