KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How/Where can I declare an object like @User so that it can be referenced globally in any razor view using @? Something similar to: _LoginPartial.cshtml: @if(Request.IsAuthenticated) { <text>Signed In As <strong>@User.Identity.Name</strong> | but instead reference my object: @if(this && that) { <text>@MyObject.GetData</text> }
Tags (comma-separated)
Save Edits
Cancel