I'm developing an ASP.NET MVC application, by default it already comes with a pre-defined template, however when I log in to the application it displays the message "Hello [email protected]!", but I wanted that instead of the email appear the name of the person logged, since I created this field in the database, to store the name in the screen of Register. Could someone help me with this?
Below the section responsible for displaying the message on the screen:
using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
{
@Html.AntiForgeryToken()
<ul class="nav navbar-nav navbar-right">
<li>
@Html.ActionLink("Olá " + User.Identity.GetUserName() + "!", "Index", "Manage", routeValues: null, htmlAttributes: new { title = "Manage" })
</li>
<li><a href="javascript:document.getElementById('logoutForm').submit()">Sair</a></li>
</ul>
}