hi friends,
how to capture / insert on time of timer value in run time ,when click the button
for example,
online quiz test is 20 minutes ,
suppose the user finished the test earlier, 15:45 (15 minutes 45 seconds ) or something.
how to capture that value remaining value when click the submit button.
protected void Timer1_Tick(object sender, EventArgs e)
{
Session["time"] = Convert.ToInt16(Session["time"]) - 1;
if (Convert.ToInt16(Session["time"]) <= 0)
{
lbl_time.Text = "TimeOut!";
}
else
{
totalSeconds = Convert.ToInt16(Session["time"]);
seconds = totalSeconds % 60;
minutes = totalSeconds / 60;
time = minutes + ":" + seconds;
lbl_time.Text = time;
}
}
}
please give the code for it..
thanks.