Access session variable in MVC razor @ if (Request.IsAuthenticated) { @ if ( HttpContext .Current.Session[ "USERSESSION" ] != null ) { @ Html.ActionLink( "Welcome " + (( UserSession )( HttpContext .Current.Session[ "USERSESSION" ])).Name, "Index" , "Home" ) } }
Angular, React, JavaScript, Java, PHP, SQL, C#, Vue, NodeJs, TypeScript and Interview Questions Answers