Why does my entire page reload in Chrome and Firefox when using asynchronous UpdatePanel postbacks?
- by Alex
Being a bit perplexed about this issue by now, I hope some of you gurus can shed some light on my problem...
I've developed a AJAX-enhanced website, which has been running fine in IE, Chrome and Firefox for a year or so. I use a Timer-control to check for incoming messages every 30 seconds, and this updates an UpdatePanel showing potential new messages.
Now several one of my Firefox users complain about the page refreshing every 30 seconds! I my self cannot reproduce this behaviour, but given the "30 seconds"-description, I cursed my Timer-solution as the culprit.
But now, I'm experiencing this error myself, not in Firefox though, but in Google Chrome! (And only on one of my two computers!) Every 30 seconds the page reloads! But I found that it's not only related to the Timer, because all other asynchronous postbacks to the server within UpdatePanels reloads the entire page as well.
This error has never been experienced in Internet Explorer (to my knowledge).
As I said, this it not only related to the Timer postback, but if it's of interest to anybody the code is like this:
<asp:Timer runat="server" ID="MailCheckTimer" Interval="30000" OnTick="MailChecker_Tick"></asp:Timer>
<asp:UpdatePanel runat="server" ID="MailCheckerUpdatePanel" UpdateMode="Conditional">
<ContentTemplate>
<div class="newmail_box" runat="server" id="newmail_box">
<!-- Content stripped for this example -->
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="MailCheckTimer" />
</Triggers>
</asp:UpdatePanel>
In other places of the website I call the client side __doPostBack function directly from JavaScript in relation to an UpdatePanel. Normal behaviour for this call is to updated the referenced UpdatePanel with some content, but now in Chrome this refreshes the entire page! (but again not consistently, and never in IE)
Even the most fundamental UpdatePanel operations like refreshing the content after a button (inside the panel) is clicked, forces the page to reload completely:
<asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click"></asp:Button>
And just to torment me further, I only experience this on my public website, and not in my local development environment, making it a tedious affair for me to find the actual cause! :(
Any ideas on why this happens? Why so inconsistently? Has it to do with my UpdatePanel-design? Or does some security setting in Firefox/Chrome that prevent some asynchronous UpdatePanel callbacks?
Any help or idea is highly appreciated!