'Specific Username or ID to hide hyperlink ASP.Net

I currently have Sessions set up to show certain hyperlinks if a user is signed in or not. Is there a way to do this for specific Usernames or ID's?

Currently my session code looks like this-

@if (Session["UsernameSS"] != null)
{
  <td>
     @Html.ActionLink("Add Thing", "Edit", new { id = item.ID }) |
     @Html.ActionLink("Details", "Details", new { id = item.ID }) |
     @Html.ActionLink("Delete", "Delete", new { id = item.ID })
  </td>
}
else
{
  <td>          
     @Html.ActionLink("Details", "Details", new { id = item.ID })
  </td>
}

Is there a way to code it so that @if (Session["UsernameSS"] == "John Doe" then only he could see a certain hyperlink?

Any help is appreciated, thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source