On a website (using a master page), I use the timer with an UpdatePanel in this way:
<asp:Timer ID="Timer1" runat="server" Enabled="true" OnTick="Timer1_Tick" Interval="2"></asp:Timer>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
<ContentTemplate>
<asp:ListView ID="ListView1" runat="server" >
<ItemTemplate>
ici mes données
</ItemTemplate>
</asp:ListView>
<asp:Image ID="imgLoader" CssClass="img-loader" runat="server" ImageUrl="~/Images/Icones/loading.gif" Width="25px" />
</ContentTemplate>
</asp:UpdatePanel>
in my code Behind :
protected void Timer1_Tick(object sender, EventArgs e)
{
ListView1.DataSource = Sql;
ListView1.DataBind();
Timer1.Enabled = false;
imgLoader.Visible = false;
}
I am using Visual Studio 2012 and so I tested the site with iisexpress.exe: Managed (v4.0.30319), and it works wonderfully By cons on my web server once I publish the loader circling because I have the following error:
ScriptResource.axd? Uncaught TypeError: n is not a constructor
My server is a Windows 2012R2 with IIS 8.5.9600, I use the application pool with the framework v4 I saw that there could be problem with the framework 2, and must modify a file AjaxTimer.js but this is the framework 4 and I have not the JS file on the server. Do you have an idea ? Thank you in advance for your help!
I updated AjaxControlToolKit from v7 to v16, now developed by DevExpress and now it works!