Tuesday, 10 September 2013

ImageButton in UpdatePanel flickers in Chrome but not in Firefox or Internet Explorer

ImageButton in UpdatePanel flickers in Chrome but not in Firefox or
Internet Explorer

I'm using two ImageButtons in an UpdatePanel to display an image which is
redrawn every time the update panel refreshes. Since the drawing takes a
noticeable time to complete, the image used to flicker on postback. I have
double-buffered the image by loading the image first to ImageButton2 on
postback, to be ready to be loaded directly to ImageButton1 on the next
postback.
This has resolved the flickering issue on IE and Firefox, however on
Chrome the flickering remains. Why might this be?
I think the issue is similar to that detailed in
http://forums.asp.net/t/1894568.aspx?How+can+i+remove+ImageButton+flickering+in+chrome+browser+
<div class="main">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server"
UpdateMode="Conditional">
<ContentTemplate>
<asp:ImageButton ID="ImageButton1" runat="server"
onclick="ImageButton1_Click"/>
<asp:Timer ID="timer1" runat="server" Interval="1"
OnTick="timer1_Tick" Enabled="True"></asp:Timer>
<asp:ImageButton ID="ImageButton2" runat="server"
onclick="ImageButton2_Click" OnLoad="ImageButton2_Load"
height="1" Width="1" style="visibility:hidden"/>
</ContentTemplate>
</asp:UpdatePanel>
</div>

No comments:

Post a Comment