I am developing a website using asp.net MVC
I want to show the name of user after he/she logged in the website.
The problem is that User.Identity.Name
returns user email and I do not want to change that because user name is not unique. And I want to access email in other pages.
I like to use a viewBag in my master page, but I do not know where to define it.
If I define it in Home/controller
, it works just for this action.
Should I use filter?