Ok, create the following class , this can be called from within another
class beit, page or one of your own. You should set this on session start to
the users name. So the users name call bed called CurrentUser.Name
Public Class CurrentUser
Public Shared Property Name()
Get
Return HttpContext.Current.Session("UserName")
End Get
Set(ByVal value)
HttpContext.Current.Session("UserName") = value
End Set
End Property
End Class
--
( OHM ) - One Handed Man
AKA Terry Burns -
http://TrainingOn.net
"Shlomi" <sh*****@gmail.com> wrote in message
news:11********************@z34g2000cwc.googlegrou ps.com...
Hi,
Until now I used the Session("x")="y" method for saving user or
customer info throw web pages (differently for each session) like that:
Session("UserName")="Bob"
My questions:
==========
In Asp.net 1, is there another way, cleaner and structured for doing
the same thing? Something like a class and syntax like
obj_User.UserName="Bob" (Important: without the necessity to declare
obj_User in each page!).
Are they any articles on that issue in the web?
Thank You,
Shlomi