i have same problem as this question.se the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation i havent any problem with <%@ Page EnableEventValidation="false" %>
.I solve it and i try
protected void Timer1_Tick(object sender, EventArgs e)
{
Label2.Text = Convert.ToString((Convert.ToInt32(Label2.Text) - 1));
if (Convert.ToInt32(Label2.Text) == 0)
{
Timer1.Dispose();
Submit();
}
}
Code work fine means submit ()
is work if i call from submit button.If its call from Timer_Tick
its not work.And timer is not stop or dispose.What is a problem plz suggest?
timer:
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Timer ID="Timer1" runat="server" Interval="1000" ontick="Timer1_Tick">
</asp:Timer>
<asp:Label ID="Label1" runat="server" Text="Remaining Time:(Min)"></asp:Label>
<asp:Label ID="Label2" runat="server" Text="100"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>