Click to See Complete Forum and Search --> : [RESOLVED] asp.net timer and session timeout


dannystommen
December 2nd, 2008, 03:37 AM
I have a added a timer (AJAX extensions) to a webform with interval 1000. So the page is loaded every second.

Does this mean that the Session can not timeout?

Bill Crawley
December 2nd, 2008, 07:11 AM
Hope this helps http://forums.asp.net/p/1221640/2180956.aspx

dannystommen
December 2nd, 2008, 08:20 AM
Nice article, but my timer does not invoke any webservice/webmethod.

it only checks a session variable


protected void timerChanged_Tick(object sender, EventArgs e) {
if (Session["PIXEL"] != null) {
API_pixel[] list = (API_pixel[])Session["PIXEL"];
Session.Remove("PIXEL");
gvPixels.DataSource = pixels;
gvPixels.DataBind();
//the gridview is on a Ajax update panel
pnlPixels.Update();
}
}

Bill Crawley
December 2nd, 2008, 09:07 AM
ok, a long article, but this should give you the answer you are looking for...http://www.codeproject.com/KB/ajax/AJAXControlsAndExtenders.aspx to sum up, the Session will get updated each time the timer is fired due to the postback mechanism