In a forms model, I used to get the current logged-in user by:
Page.CurrentUser
How do I get the current user inside a controller class in ASP.NET MVC?
Let's say I have a class
public class ItemController:Controller
{
public ActionResult Login(int id)
{
return View("Hi", id);
}
}
On a page that is not located at the Item folder, where ItemController resides, I want to create a link to …
I am trying to run Asp.net MVC project retrieved from TFS source control. I have added all assembly references and I am able to build and compile successfully without any error or warning.
But I get the following error …