hi friends,
How to display messagebox after timeout in Timer1_Tick
i give the these belowcode,but its not working,
Response.write("<script>alert('Time is Over')</script>");
Response.Write("<script>window.location.href('result.aspx')</script>");
please give the solution for it.
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!";
//Response.Write("<script>alert('Time Over')</script>");
//Response.Write("<script>window.location.href('result.aspx')</script>")
}
else
{
totalSeconds = Convert.ToInt16(Session["time"]);
seconds = totalSeconds % 60;
minutes = totalSeconds / 60;
time = minutes + ":" + seconds;
lbl_time.Text = time;
}
thanks.