When the user is in the /home/ directory I want to render some particular view content but when the user typed in /home/users/someUser I want to check if the request is not a /home/ request and output some other content
so far I got that much
if (User.Identity.IsAuthenticated && Request ???)
{
<li>
<a class="btnAddTopTenFav icons">+</a>
</li>
} else
{
<li></li>
}
I check if the user is logged in and then I need to check if he’s at the home page or some other page.. how to do this?
You can check which controller you’re coming from by writing
ViewContext.RouteData.Values["controller"].ToString()