How can I change the below mentioned code to show: Hello "First Name" instead of Hello "UserName".
I have already created some custom fields inside my Identity user table such as "FirstName","MiddleName","LastName".
Below mentioned code is inside Site.Master.
<li>
<a runat="server" href="~/Account/Manage" title="Manage your account">
Hello, <%: Context.User.Identity.GetUserName() %> !
</a>
</li>
I appreciate your efforts in reaching a solution for my problem.
You will have to typecast the identity to the custom identity you made.. So you can use the field you used there. The code would look like this:
First Add
Microsoft.AspNet.Identity.Owin
namespace inweb.config
then replace your code with:
Try using
It should work
Or you should try