I have a webforms application with functions that frequently require a particular value, in this case the logged in user:
// Get user
string strUser = (HttpContext.Current.User.Identity.Name);
What it the best way to populate this string only once and call it from everywhere in my application?
you can have a Session variable to hold it
If its a session dependent variable like a logged in user name use
Session stateelse use
Application state, Application state applies to all users and sessions