having an ajax timer running to check connection,
wondering why the label lblsessiontimeleft inside update panel udpSession does not change accordingly, meant for it to decrease its value by one second thereafter
protected void TimerSession_Tick(object sender, EventArgs e)
{
recheckconn();
if ((string)Session["sConnLetter"] == "c")
{
DateTime datetimenow = DateTime.Now;
DateTime datetimesession;
datetimesession = datetimenow.AddMilliseconds((int)Session["sSessionTimeout"]);
TimeSpan tstd;
TimeSpan tstd1;
tstd = datetimesession.AddMilliseconds((int)Session["sSessionTimeout"]) - DateTime.Now;
tstd1 = tstd.Subtract(new TimeSpan(0, 0, 1));
if (Session["sSessionTimeout1"] != null)
{
Session["sTimeDifferent"] = datetimesession.AddMilliseconds((int)Session["sSessionTimeout1"]) - DateTime.Now;
tstd = datetimesession.AddMilliseconds((int)Session["sSessionTimeout1"]) - DateTime.Now;
tstd1 = tstd.Subtract(new TimeSpan(0, 0, 1));
}
Session["sSessionTimeout1"] = tstd1.Milliseconds;
lblsessiontimeleft.Text = tstd1.Milliseconds.ToString();
pnlSession.Style.Add("display", "block");
udpSession.Update();
}