If you're using Forms Authentication - and it sounds as though you should
be - then you can get the user's credentials from the Identity propery of
the GenericPrincipal object. Look up GenericPrincipal in MSDN and follow
the trail to GenericIdentity for examples of how this works. Basically, the
Name property of the GenericPrincipal's Identity property gives you what you
want.
If you need to roll your own you have several options. The easiest is just
to store the string in the Session:
Session["uid"] = strUserName;
You would do this in some convenient event handler in your Login.aspx page
codebehind - usually in the handler for the submit button, I guess, when
someone logs in.
If you're storing more information about your user than just the user name,
you'll probably want to create an object from a class you define, store the
username in that object (along with whatever else you want to put in there),
and store a reference to that object in the Session.
MyUserObj myuserobj = new MyUserObj();
myuserobj.username = strUserName; // assuming username is a property
Session["MyUserObj"] = myuserobj;
Your object is now globally accessible.
Only your own application model (UML or whatever) will tell you which
strategy is best for your application.
HTH
Peter