Hello,
I've got a nifty problem!
I've created an ASP.NET page with an updatepanel and a trigger on that updatepanel. The trigger updates the panel every 30 seconds.
The problem is that when the trigger updates the panel, IE8 takes the focus from any other program that I'm using. Does anyone have a solution for this?
This happens in IE8; in Firefox I've got no problems with this.
This is the timer with updatepanel:
<asp:Timer ID="Timer1" runat="server" Interval="30000" ontick="Timer1_Tick">
</asp:Timer>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
<asp:AsyncPostBackTrigger ControlID="ButtonSubmit" EventName="Click" />
</Triggers>
<ContentTemplate>
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
<ProgressTemplate>
Loading....
</ProgressTemplate>
</asp:UpdateProgress>
<asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder><br />
<div class="clear"></div>
<asp:Label ID="Label4" runat="server" Text="Grid not refreshed yet.">
</asp:Label><br />
<asp:Label ID="Label5" runat="server" Text="(Grid Will Referesh after Every 30 Sec)" Font-Bold="true"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
On the timer tick I only perform this action:
protected void Timer1_Tick(object sender, EventArgs e)
{
Label4.Text = "Grid Refreshed at: " + DateTime.Now.ToLongTimeString();
}
Thanks in advance.
I hope anyone knows why IE8 "steals" the focus.