how to capture / insert on time of timer value in run time ,in asp.net using sqlserver

Posted by Dn2010 under ASP.NET on 2/1/2011 | Points: 10 | Views : 2489 | Status : [Member] | Replies : 0
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.




Responses

(No response found.)

Login to post response