Prabath Yapa
Prabath Yapa

Reputation: 1229

ASP.NET Ajax UpdatePanel flicker

Here's my code

<asp:LinkButton ID="createChart" runat="server" OnClick="createChart_onClick"></asp:LinkButton>
<asp:UpdatePanel ID="result" runat="server" UpdateMode="Conditional">
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="submit" />
            </Triggers>
            <ContentTemplate>
                <!-- content -->
            </ContentTemplate>
</asp:UpdatePanel>

It works great. My problem is that every now and then i see a white flicker sometime in between a request and a response. It's a little annoying. Is this a common occurrence or could it be because of some other javascript on my page?

Upvotes: 1

Views: 3719

Answers (2)

Brian Ogden
Brian Ogden

Reputation: 19212

In Chrome you will see a flicker with the UpdatePanel if your ajax response contains image urls. I noticed that this flicker did not occur with Safari, Firefox or Safari mobile but just Chrome and stopped when I removed <img src="/images/photo.png" /> from ajax response content.

Upvotes: 3

Cheng Chen
Cheng Chen

Reputation: 43513

You can easily improve it using UpdateProgress.

<asp:UpdateProgress ID="updLoading" DisplayAfter="2500" runat="server" AssociatedUpdatePanelID="updContent">
 <ProgressTemplate>
    <img src="../../Images/ajax-loader.gif" align="middle" />
           Loading.  Please Wait...
 </ProgressTemplate>
</asp:UpdateProgress>

Upvotes: 2

Related Questions