User Information on logon page MVC4 Razor

kevink

New Member
I'm currently developing a asp.net (MVC) where I'm storing additional information in the Users table i.e. First Name, Last Name, Date of birth, etc... Standard data!!When I login, I use the email address as the Username, but instead of displaying the email address in the login page (_LoginPartial.cshtml), I want to display FirstName + " " + LastName instead.In the _LoginPartial.cshtml, the code to display the "username" which happens to be the "email" address in my case looks like Hello, @Html.ActionLink(User.Identity.Name, "Manage", "Account", routeValues: null, htmlAttributes: new { @class = "username", title = "Manage" })!but instead of wanting to use User.Identity.Name, I want to use the FirstName & LastName associated with that email address, so I've got a couple of questions in regards to this:[*]How to I get the user info/data - I can't see a .GetUser function. Do I need to implement my own? If so, where do I put this code?[*]What do I need to replace User.Identity.Name with?Many thanks.Thierry
 
Back
Top