Session state in a component
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngibuyspy' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Kevin White
Hi there,

How can I access session variables in one of the compnent vb files?

Thanks,
Kevin
Reply to this message...
 
    
Brian Bilbro (VIP)
Yes:

System.Web.HttpContext.Current.Session

HTHs,
Brian

----- Original Message -----
From: Kevin White
To: aspngibuyspy
Sent: Wednesday, July 24, 2002 1:22 PM
Subject: [aspngibuyspy] Session state in a component

Hi there,

How can I access session variables in one of the compnent vb files?

Thanks,

Kevin

| [aspngibuyspy] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngibuyspy.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives
Reply to this message...
 
    
Kevin White
Hi there,

Could you explain a bit more please?

In the configuration.vb file I would like to use x = session(“variablename”)
for example. Where does “System.Web.HttpContext.Current.Session” go?

Thanks
-----Original Message-----
From: Brian Bilbro [mailto:Click here to reveal e-mail address]
Sent: 24 July 2002 23:41
To: aspngibuyspy
Subject: [aspngibuyspy] Re: Session state in a component

Yes:

System.Web.HttpContext.Current.Session

HTHs,
Brian

----- Original Message -----
From: Kevin White <mailto:Click here to reveal e-mail address>
To: aspngibuyspy <mailto:Click here to reveal e-mail address>
Sent: Wednesday, July 24, 2002 1:22 PM
Subject: [aspngibuyspy] Session state in a component

Hi there,

How can I access session variables in one of the compnent vb files?

Thanks,
Kevin

| [aspngibuyspy] member Click here to reveal e-mail address <mailto:Click here to reveal e-mail address> YOUR ID
| http://www.asplists.com/asplists/aspngibuyspy.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives
| [aspngibuyspy] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngibuyspy.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives
Reply to this message...
 
    
Brian Bilbro (VIP)
If your vb file is in a seperate project you'll need to add a reference =
to System.Web
after that you can do:

x =3D System.Web.HttpContext.Current.Session("variablename")

HTHs,
Brian

----- Original Message -----
From: "Kevin White" <Click here to reveal e-mail address>
To: Click here to reveal e-mail address
Sent: Thu, 25 Jul 2002 10:33:03 +0100
Subject: RE: [aspngibuyspy] Re: Session state in a component
[Original message clipped]

Sent: 24 July 2002 23:41
To: aspngibuyspy
Subject: [aspngibuyspy] Re: Session state in a component
[Original message clipped]

To: aspngibuyspy <mailto:Click here to reveal e-mail address>
Sent: Wednesday, July 24, 2002 1:22 PM
Subject: [aspngibuyspy] Session state in a component
[Original message clipped]

Reply to this message...
 
 
System.Web.HttpContext




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com