I have enabled the timer so when It count to 10, button should show up and timer should stop running. It keeps reloading the page every time it increments the count. Is there a quick fix for this? Below is the code. Thank in advance.
public partial class mainUser : System.Web.UI.Page {
private static int c = 0;
protected void Page_Load(object sender, EventArgs e)
{
lvlTimer.Visible = false;
Timer1.Enabled = true;
}
protected void btnTakeQuiz_Click(object sender, EventArgs e)
{
}
protected void Timer1_Tick(object sender, EventArgs e)
{
Timer1.Interval = 1500;
c = c + 1;
lvlTimer.Text = c.ToString();
if (c == 10)
{
Timer1.Enabled = false;
btnTakeQuiz.Visible = true;
}
}
}