Reputation: 13
I have an ASP.Net website which completely unattended displays schedules at a bus station. It updates every minute. Problem is - it flickers. Update is achieved using this:
meta content="60" http-equiv="Refresh"
and in the ASPX file is is as simple as this:
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
..daragrid and stuff...
</ContentTemplate>
</asp:UpdatePanel>
How can I maintain the 60 seconds update and at the same time avoid flicker?
Upvotes: 1
Views: 659
Reputation: 66641
The command
meta content="60" http-equiv="Refresh"
make the flickering because is make full page reload / refresh - the UpdatePanel and the ajax you mention have nothing to do neither you trigger it with this command.
From MSDN: Tutorial: How to refresh an UpdatePanel control at a timed interval
Upvotes: 2
Reputation: 10012
A refresh is not a postback which is what the UpdatePanels are made for, the Refresh is essentially like pressing F5 on your browser.
You will want to investigate the Timer Control for ASP, have that running in the background.
However you will note that the datagrid will still flicker if you are getting new content, you may want to look at fading out the datagrid, refreshing it and then fading it back in to avoid the flicker.
Upvotes: 1