using global.asax.vb for defining global parameters

O

OK

I use Global.asx.vb for declaration of my global paramaters such as the
Employee number of an Employee who logged into the website. I found this as
the only way to handle these parameters in another aspx pages. Anyting works
good up to now.

In case another employee logs into the website who of course has another
employee number while the first employee still is online, does asp.net for
vb handle this as a session parameter or will the global parameter be
overwritten?
 
M

Mark Rae [MVP]

OK said:
I use Global.asx.vb for declaration of my global paramaters such as the
Employee number of an Employee who logged into the website. I found this as
the only way to handle these parameters in another aspx pages. Anyting
works good up to now.

In case another employee logs into the website who of course has another
employee number while the first employee still is online, does asp.net for
vb handle this as a session parameter or will the global parameter be
overwritten?


For user-specific metadata which you want to cache, create it in
Session_Start and store it in the Session object...
 
O

OK

Thanks Mark and Peter,

Is there a way of defining the session variables in vb at forehand in such
that I can refer to them as a property such as Sessionparameters.ID_employee
rather than typing (Session("ID_employee") them?

Oscar
 
M

Mark Rae [MVP]

Is there a way of defining the session variables in vb at forehand in such
that I can refer to them as a property such as
Sessionparameters.ID_employee rather than typing (Session("ID_employee")
them?

Not natively. You could write a Session wrapper, I suppose, but I can't see
the point...
 
P

Peter Bromberg [C# MVP]

Dood. Don't get hung up on the small stuff when you are just getting on first
base.
Later, you may be able to afford persnicketiness.
--Peter
"Inside every large program, there is a small program trying to get out."
http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://www.blogmetafinder.com



OK said:
Thanks Mark and Peter,

Is there a way of defining the session variables in vb at forehand in such
that I can refer to them as a property such as Sessionparameters.ID_employee
rather than typing (Session("ID_employee") them?

Oscar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top