Hai friends,
I am beginner to MVC.
According to my application, the user logins in child page whenever user login the layout page should display "hai username".
That means after user logins , The concern user name should be displayed on the layout page.
Thank you.
Retrieving session value in layout page in MVC
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Shweta LodhaRank #31 · 39.8K reputationPosted Nov 21, 2014, 3:05 AM EST
for the above to work you need
using System.Web.Security; // this enables Membership.
More info: http://forums.asp.net/t/1367379.aspx?Display+user+name+in+the+header+when+logged+in
Sreekanth ReddyRank #726 · 3.2K reputationPosted Nov 21, 2014, 4:36 PM EST