I have a script that does a while loop and does some requests
<p>Result @Content</p>
private string Content;
public async Task StartAsync()
{
while(!taskCanel) {
Content = await webSocket.SendAsync(..);
StateHasChanged();
await Task.Delay(15000);
}
}
but whenever I switch another page with my navbar then go back to this page it reset everything like it creates a new instance of my razor page.
How can I navigate to the page without losing all states and content?