Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Session woes
Message
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00907424
Message ID:
00907550
Vues:
7
>I want to create a function that works with session vars. I have this written, however, I want to make it available globally in my web app. I would prefer not to have to pass the session in every call(which doesn't seem to be working anyway). How can I access the session from a non-webpage class or ... ?
>
>My thanks in advance,

I realize that Vlad has already provided a solution - but for the sake of completeness, here is some VB code that I've used to access the session object.
Dim oSession As System.Web.SessionState.HttpSessionState
oSession = System.Web.HttpContext.Current.Session
' or
oSession = Me.Context.Current.Session
censored.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform