May 09, 2019 05:44 PM|PatriceSc|LINK
You have to store this value somewhere so that you can restart from the last value. Where to store a value delpends often on :
- how long do you need it (ie until the browser session ends, or even if the user comes back 10 days later ?)
- and/or where you need it (only on the client side, on the server side or both)
See https://docs.microsoft.com/en-us/aspnet/core/fundamentals/app-state?view=aspnetcore-2.2 for possible options (and of course you can store values in a db).
Explain what is the purpose of this value if you need help about which option would fit your need.
The basic principle is that the web is stateless ie when doing an http request (even on the same page) the whole cycle restart from scratch.