Hi Bapo,
I created a small timer using two different timers in different update panels and was only able to get the Tick event for one of them... I suspect the "postback" in one of the update panels causes the second timer to reset. I have tested this by setting one to 1 second intervals and the other to 2 second... then to reverse them. Only the first triggered tick would trigger the events.
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Label1.Text = "0";
Label2.Text = "0";
}
}
protected void Timer1_Tick(object sender, EventArgs e)
{
int Time1 = Convert.ToInt16(Label1.Text);
Time1 += 1;
Label1.Text = Time1.ToString();
((Timer)sender).Enabled = true;
}
protected void Timer2_Tick(object sender, EventArgs e)
{
int Time2 = Convert.ToInt16(Label2.Text);
Time2 += 1;
Label2.Text = Time2.ToString();
((Timer)sender).Enabled = true;
}
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Style="position: relative"></asp:Label>
<asp:Timer ID="Timer1" runat="server" Interval="1000" OnTick="Timer1_Tick">
</asp:Timer>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:Label ID="Label2" runat="server" Style="position: relative"></asp:Label>
<asp:Timer ID="Timer2" runat="server" Interval="2000" OnTick="Timer2_Tick">
</asp:Timer>
</ContentTemplate>
</asp:UpdatePanel>
Please click 'Mark as Answer' if my reply has assisted you.
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools." ~ Douglas Adams
http://wildobson.com