In my JQuery, I have a some code that goes to database after each time interval mentioned in my Web.config...I have a button as well, on clicking the button should stop the current SetInterval to 10 seconds... I am using below mentioned code..
window.setTimeout(MyFunction, 10000);
MyFunction is the callback
function MyFunction() {
window.setTimeout(MyFunction, 10000);
}
Controller Actions
public JsonResult GetUpdates()
{
}
Confusion is It still going to the database again.