I want to make a page that will refresh data once in a while.
I'm not sure if it's related to radzen. When the page is a little complicated (for example, the current user information is read and displayed), statehaschanged looks like crash, and then the timer stop.
there is timer code
protected override void OnAfterRender(bool firstRender)
{
if (firstRender)
{
var timer = new Timer(new TimerCallback(_ =>
{
test++;
this.InvokeAsync(() => this.StateHasChanged());
}), null, 1000, 2000);
}
}
Is there a way to solve this problem?