Last post Nov 06, 2019 08:08 AM by Lewis Lu
Member
68 Points
128 Posts
Nov 05, 2019 04:23 PM|shreenidhi|LINK
Hello
I have a view which basically show user profile like Name, Designation etc.
There is a image box where the Image of logged in user has to be displayed.
Using - ClaimsIdentity / Identity
Please suggest
180 Points
88 Posts
Nov 06, 2019 08:08 AM|Lewis Lu|LINK
Hi shreenidhi,
If you already have claims attached to the current principal in your project.You could use this In your Razor view:
@((ClaimsIdentity) User.Identity)
This will give you access to the ClaimsIdentity of the current user.You could also refer to the following link :
https://stackoverflow.com/questions/39125347/how-to-get-claim-inside-asp-net-core-razor-view
Best Regards,
Lewis
Member
68 Points
128 Posts
Display Logged-In user image from Claims Identity to a view cshtml
Nov 05, 2019 04:23 PM|shreenidhi|LINK
Hello
I have a view which basically show user profile like Name, Designation etc.
There is a image box where the Image of logged in user has to be displayed.
Using - ClaimsIdentity / Identity
Please suggest
Member
180 Points
88 Posts
Re: Display Logged-In user image from Claims Identity to a view cshtml
Nov 06, 2019 08:08 AM|Lewis Lu|LINK
Hi shreenidhi,
If you already have claims attached to the current principal in your project.You could use this In your Razor view:
This will give you access to the ClaimsIdentity of the current user.You could also refer to the following link :
https://stackoverflow.com/questions/39125347/how-to-get-claim-inside-asp-net-core-razor-view
Best Regards,
Lewis