<asp:Timer ID="Timer1" runat="server" Interval="2000" ontick="Timer1_Tick" > </asp:Timer>
protected void Timer1_Tick(object sender, EventArgs e) { int seconds; if (Convert.ToString(Lable2.Text) != "") { seconds = int.Parse(Lable2.Text); } else { seconds = Convert.ToInt32(60);//set some time count in default timer } Session["timeoutSecond"] = (seconds - 1).ToString(); if (seconds > 0) { Lable2.Text = (seconds - 1).ToString(); } else { //Timer1.Enabled = false; } }
tot_seconds
int seconds = tot_seconds % 60; int minutes = tot_seconds / 60;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)