This might be a best practices question.
I have created a class called CurrentUserInfo I want to be able to use the class to grab information about the currently logged in user anywhere in the project (asp.net)
in my mind I thought I could define the properties and have the values set by a function within the same class...
I wanted to do this because it is information that does not change and as soon as the user opens the page the information is available
so would look something like this
Public Shared sUserName As String = GetUserName()
As you might have guessed vb dosent like that
my questions are
1) Can this be done at all - where by retrieving the value of the property from another form it causes the property to fill itself (clear as mud)
2) should I be doing this a completely different way...