I am using AuthorizeView to display the Dashboard button if the user has the admin role. The problem is that after authentication the button does not display. Only after I refresh the browser the button becomes visible. Is there a better approach to make this in razor view?
<AuthorizeView Roles="@_roles">
<Authorized>
<ul class="nav">
<li><a href="/dashboard" class="nav-link"> Dashboard</a></li>
</ul>
</Authorized>
</AuthorizeView>