In the case of “VS2010 web application in C #” you are talking about ASP.NET (MVC or Classic) and “user-friendly approach”, you mean FormsAuthentication , then you only need to save your necessary information during login system on Session .
Let's say you use ASP.NET Classic and you have a login page

which has 2 inputs for username and password and a submit button called "Login"

In the OnClick event handler (server side) you should do something like this:
public partial class Login : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } private bool CheckUserPass(string username, string password) {
So, in short, if you use FormsAuthentication, you can save the username in the session just as you tell FormsAuthentication that the current session should be converted from unidentified to authenticated:
FormsAuthentication.RedirectFromLoginPage(this.textBoxUsername.Text, createPersistentCookie: false);
while other information can be placed in the Session object (just as you would add key value pairs to the dictionary):
this.Session["TIME_OF_LOGIN"] = DateTime.UtcNow;
It is obvious so far that you can later access the same information (for the corresponding user):
DateTime whenDidILogin = (DateTime) this.Session["TIME_OF_LOGIN"]; // this line of code can be used in any other page // at any later time - it like you have a global set of variables // which exist for each and every distinct session you might have
perhaps it’s important to note that the username (if it is not explicitly placed on the Session object, like other examples), can be accessed using Thread.CurrentPrincipal static like this:
using System.Threading; public void SomeWhereInYourApp() { bool wasIAuthenticated = Thread.CurrentPrincipal.Identity.IsAuthenticated; string whatIsMyUsername = Thread.CurrentPrincipal.Identity.Name;