G
Gauthier Segay
Hello,
I've an application where all my pages implement a PAGE_CODE string
property, this property is stored in HttpContext.Current.Items.
In some page, I must persist data in session while the user perform
operation on this page (postback navigation based). I also need to
clean up the session data when the user leave the page (by a anyway).
My question is about the Unload event, is it safe to use the unload
event and check if the PAGE_CODE is out of scope to remove session
variables that are used in the unloaded page?
I ask this because after some tests, it happen that unload is trigged
on the next navigation within the same session and I can't find any
clear description on when this event will be trigged on the server side.
Either way, what is your strategy to remove unneeded variables in
session? Does anyone allready use the Unload event?
Thanks for your insight.
Gauthier
I've an application where all my pages implement a PAGE_CODE string
property, this property is stored in HttpContext.Current.Items.
In some page, I must persist data in session while the user perform
operation on this page (postback navigation based). I also need to
clean up the session data when the user leave the page (by a anyway).
My question is about the Unload event, is it safe to use the unload
event and check if the PAGE_CODE is out of scope to remove session
variables that are used in the unloaded page?
I ask this because after some tests, it happen that unload is trigged
on the next navigation within the same session and I can't find any
clear description on when this event will be trigged on the server side.
Either way, what is your strategy to remove unneeded variables in
session? Does anyone allready use the Unload event?
Thanks for your insight.
Gauthier