P
P
password222021-10-07 21:14:53
ASP.NET
password22, 2021-10-07 21:14:53

How to add data on a timer without refreshing the page?

Good evening. I've been trying to solve this problem for several days now: it is necessary to display the data received via api on the page every 10 minutes without updating it.

I tried many ways, I can't list them. But still, these are ready-made solutions that I tried

  1. Quartz and Coravel. They can perform background tasks, that is, I cannot take data through them (I take them through api) and display them as a partial view.
  2. timer. It can just as well perform tasks through delegates that return nothing.
  3. scheduler. All sorts of plugins for executing tasks on a schedule also perform tasks through which I can’t display data on the page in any way


I may not know something or see a solution

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-10-07
@password22

Anyway, you have to use JS.
In order to receive data without refreshing the page, I advise you to look at SignalR.
If the backend receives the data, then you shove the received data into SignalR and display it on the page.
If the frontend itself can request data from the API, then use setTimeout in JS

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question