Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Partial Postbacks and Callbacks; how do they affect Session State

$
0
0

I have been doing a lot of reading about Timeout notifications.  I have seen a lot of tools that print a disclaimer about timeout resets from Update panels, and Ajax callbacks.  After doing some reading, I realized that there is a difference between a partial postback from an update panel and a callback.  There was a tool that overlooked update panel partial postbacks which subsequently printed code to rectify this.  There was another tool that used Ajax call backs every 30 seconds to run a web method on the server to determine when the session state had expired.  The web method worked by generating a time initiated in the session_start event then determining the time elapsed by subtracting that figure from the current time and comparing that to the servers Session.Timeout value.  (One wonders how this could work when the session is refreshed with each postback but the session_start event does not run again.) 

My question though is this.  Does a partial postback constitute a session "keep alive"?  Does a callback?   If the session is not refreshed with a partial postback why would you care if a timeout notification tool does not refresh the local page timeout when this occurs?  If a callback does refresh a page how could you use a web method to determine whether the session has timed out.

As you can tell from the above questions, based on my reading I kinda think a partial postback does refresh the session, and a callback does not.  Can I get a yea or nay on this perception?


Viewing all articles
Browse latest Browse all 5678

Trending Articles