try this code.....study it as demo....then try implement in your logic....what u have to do is save time in session variable.....
.aspx page as follow
<asp:Panel ID="Panel1" runat="server" Height="303px">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Timer ID="Timer1" runat="server" Interval="1000" OnTick="Timer1_Tick"
Enabled="False">
</asp:Timer>
<br />
<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
<ContentTemplate>
<asp:Button ID="Button3" runat="server" Text="Start" Width="213px"
onclick="Button3_Click" />
<br />
<br />
<asp:Label ID="Label9" runat="server" Text="Remaining Time"></asp:Label>
:
<asp:Label ID="Label8" runat="server" Text=""></asp:Label>
<br />
</ContentTemplate>
</asp:UpdatePanel>
<br />
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
<ContentTemplate>
<asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
)
<asp:Label ID="Label3" runat="server" Text="Label"></asp:Label>
<br />
<hr />
<asp:RadioButton ID="RadioButton1" runat="server" GroupName="option1" />
<asp:Label ID="Label4" runat="server" Text="Label"></asp:Label>
<br />
<br />
<asp:RadioButton ID="RadioButton2" runat="server" GroupName="option1" />
<asp:Label ID="Label5" runat="server" Text="Label"></asp:Label>
<br />
<br />
<asp:RadioButton ID="RadioButton3" runat="server" GroupName="option1" />
<asp:Label ID="Label6" runat="server" Text="Label"></asp:Label>
<br />
<br />
<asp:RadioButton ID="RadioButton4" runat="server" GroupName="option1" />
<asp:Label ID="Label7" runat="server" Text="Label"></asp:Label>
<br />
<br />
</ContentTemplate>
</asp:UpdatePanel>
<asp:Button ID="Button1" runat="server" Text="Next" Width="215px"
onclick="Button1_Click" />
</asp:Panel>
.cs file i.e code behind file.....
protected void Button3_Click(object sender, EventArgs e)
{
Timer1.Enabled = true;
Session["start_time"] = DateTime.Now.ToLongTimeString();
Session["end_time"] = 15;
Button3.Enabled = false;
Session["question_counter"] = 0;
Session["rightquestions"] = 0;
Session["currentans"] = "";
Button1_Click(null, null);
}
protected void Button1_Click(object sender, EventArgs e)
{
}
protected void Timer1_Tick(object sender, EventArgs e)
{
Session["end_time"] = (int.Parse(Session["end_time"].ToString()) - 1).ToString();
if (Session["end_time"].ToString() == "0")
{
Timer1.Enabled = false;
}
Label8.Text = Session["end_time"].ToString();
}
remember this is not complete code...it is demo...ur problem of refresh is have solution over here....on Next button click it is not refreshed....try it...and then apply ur logic for Next question...most importantly all online exam give warning message before start exam that "DO NOT REFRESH PAGE DURING EXAMINATION TIME"....hope it will help...