if (Convert.ToInt32(Session["minute"]) == 0 && Convert.ToInt32(Session["seconds"]) == 0) { // Your code } else { if (Convert.ToInt32(Session["seconds"]) < 1) { Session["seconds"] = 59; if (Convert.ToInt32(Session["minute"]) != 0) Session["minute"] = Convert.ToInt32(Session["minute"]) - 1; } else Session["seconds"] = Convert.ToInt32(Session["seconds"]) - 1; string mins = "", sec = ""; if (Convert.ToInt32(Session["minute"]) <= 9) mins = "0" + Session["minute"].ToString(); else mins = Session["minute"].ToString(); if (Convert.ToInt32(Session["seconds"]) <= 9) sec = "0" + Session["seconds"].ToString(); else sec = Session["seconds"].ToString(); lblTimer.Text = "Time Left : " + mins + " : " + sec; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)