When working on an ASP.NET MVC project, I wanted to include a short message for the user, such as 'Hello, username!'
In the navigation bar, specifically when the user is signed in, I encountered some display issues with the standard bootstrap layout. I am unsure of which CSS or HTML adjustments are needed. Below is what I have attempted so far:
@if (Session["Username"] != null)
{
<ul class="nav navbar-nav navbar-right">
<li>Hello, @Session["Username"]</li>
<li>@Html.ActionLink("Logout", "Logout", "Home")</li>
</ul>
}
else
{
<ul class="nav navbar-nav navbar-right">
<li>@Html.ActionLink("Register", "Register", "Home")</li>
</ul>
}
This code snippet is part of my _Layout page. Although the text displays correctly, it seems slightly misaligned and appears darker than the actionlinks. How can I adjust it to match the style of the actionlinks?