Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Is there a way to access Cookies in Blazor with @rendermode="InteractiveAuto" in the Oninitialized hook

$
0
0

I know how to access cookies in Blazor in the OnAfterRender hook using Javascript. But, I need to access cookies in Oninitialized before javascript is available.

I've tried the adding the following:

[CascadingParameter]    private HttpContext HttpContext { get; set; }

but the IDE complains that it doesn't even know what HttpContext is.Can anyone please help me access cookies from Oninitialized?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>