Jan 16, 2021 10:25 PM|valenciano8|LINK
I've been searching the web for a way to use Identity current user's attributes with Razor syntax for hours and couldn't really find an answer.
With a foreach loop I would use a
@foreach(var user in ViewData["user_list"])
But this won't work as I want to access the current user's attributes
<a asp-controller="User" asp-action="Signout">
<img class="avatar_img" src="data:image/png;base64,@Convert.ToBase64String(@User.Identity.Avatar)"/>
<a asp-controller="User" asp-action="Signout">Se déconnecter</a>
<a asp-controller="User" asp-action="Signin">Se connecter</a>
Any Idea ?
I also thought about directly sending those attributes from the Controller but it's the same issue (current user's attributes are not accesible from what I've tried)
Thanks in advance for your help