Solved

Update DIV tag with AJAX using a timer

Posted on 2010-09-07
1
454 Views
Last Modified: 2012-05-10
Hi

I am new to Ajax and getting there, but am now stuck !

I have created a web service that can be called by Ajax to return a value. What I want now, is a timer to call that web service at a fixed interval

What I have done, works perfectly when you click a button, it calls the javascript function, which calls the web service and updates the value

I have done this by putting this into the Page_Load on the asp.net: ListBox1.Attributes.Add(@"onchange", "GetNotificationsCount('value');");

I have searched the internet and everything related to Timers seems to involve UpdatePanels and I can't work out how to get that to then link to a javascript function

So, what I need, is a timer that will call the GetNotificationsCount function at a defined interval, is this possible, if so how ?

Thank you very much
0
Comment
Question by:seancurt
1 Comment
 
LVL 18

Accepted Solution

by:
Anil Golamari earned 500 total points
ID: 33622191
http://forums.asp.net/p/1377285/2901229.aspx ( Sample code)

http://dotnetslackers.com/columns/ajax/ASPNETAjaxWebService.aspx ( sample web service example which implement timer)

Hope these links helps you.

Good Luck
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Upgrade code from VS 2010 to VS 2015 7 31
Problem to copy file 14 42
C# DataTable (in memory) vs SQL Lookups 4 30
Calculating percentage 2 26
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question