Hi,
You can try the below sample with Ajax Timer.
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" >
<ContentTemplate>
<asp:Timer ID="Timer1" runat="server" Interval="3000" ontick="Timer1_Tick">
</asp:Timer>
The server counter is:<asp:Label ID="Label1" runat="server" Text="0"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" >
<ContentTemplate>
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
</ContentTemplate>
</asp:UpdatePanel> protected void Timer1_Tick(object sender, EventArgs e)
{
if (Application["polling"] == null)
Application["polling"] = 0;
Label1.Text = Application["polling"].ToString();
}
protected void Button1_Click(object sender, EventArgs e)
{
if (Application["polling"] == null)
Application["polling"] = 0;
Application["polling"] = int.Parse(Application["polling"].ToString())+1;
}
You can also store the counter into the database.
The below links are about polling system.
http://www.scriptlance.com/projects/1215631785.shtml
http://www.dhtmlgoodies.com/index.html?whichScript=ajax-poller