$.ajax({
type: "POST",
url: "BackGroundService/DispatcherTimerSetup",
data: { lati: lati, longi: longi },
async: true,
cache: false,
datatype: "html",
[HttpPost]
public void DispatcherTimerSetup(HttpClient httpClient, string lati, string longi, string UserId)
{
dispatcherTimer = new DispatcherTimer();
dispatcherTimer.Tick += dispatcherTimer_Tick;
dispatcherTimer.Interval = new TimeSpan(0, 0, 2);
if (!dispatcherTimer.IsEnabled)
{
dispatcherTimer.Start();
}
}
async void dispatcherTimer_Tick(object sender, object e)
{
//Some functionality
}
I tried Dispacher But it's not working means Break Point not hitting dispatcherTimer_Tick(object sender, object e) this method So I decided to do with Normal Timer it self can any one give me any Examples please