accessing session in a server control
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngfreeforall' list.


Chris
Is it possible to access Session information from within a server
control? If so, what is the best way to do so?

Thanks in advance,
Chris
Reply to this message...
 
    
chris
MessageHttpContext.Current.Session

-Chris Frazier
.NET Solution Developer
Velocity Databank, Inc.
www.velocitydatabank.com

-----Original Message-----
From: Chris [mailto:Click here to reveal e-mail address]
Sent: Friday, August 09, 2002 5:58 PM
To: aspngfreeforall
Subject: [aspngfreeforall] accessing session in a server control

Is it possible to access Session information from within a server control?
If so, what is the best way to do so?

Thanks in advance,
Chris
| ASP.net DOCS = http://www.aspng.com/docs | [aspngfreeforall] member
Click here to reveal e-mail address = YOUR ID |
http://www.asplists.com/aspngfreeforall = JOIN/QUIT | news://ls.asplists.com
= NEWSGROUP
Reply to this message...
 
    
Scott.Wiseman
any examples of this?

-----Original Message-----
From: chris [mailto:Click here to reveal e-mail address]
Sent: Monday, August 12, 2002 7:44 AM
To: aspngfreeforall
Subject: [aspngfreeforall] RE: accessing session in a server control

HttpContext.Current.Session

-Chris Frazier
.NET Solution Developer
Velocity Databank, Inc.
www.velocitydatabank.com

-----Original Message-----
From: Chris [mailto:Click here to reveal e-mail address]
Sent: Friday, August 09, 2002 5:58 PM
To: aspngfreeforall
Subject: [aspngfreeforall] accessing session in a server control

Is it possible to access Session information from within a server control?
If so, what is the best way to do so?

Thanks in advance,
Chris
| ASP.net DOCS = http://www.aspng.com/docs | [aspngfreeforall] member
Click here to reveal e-mail address = YOUR ID |
http://www.asplists.com/aspngfreeforall = JOIN/QUIT | news://ls.asplists.com
= NEWSGROUP

| ASP.net DOCS = http://www.aspng.com/docs | [aspngfreeforall] member
Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/aspngfreeforall
= JOIN/QUIT | news://ls.asplists.com = NEWSGROUP
Reply to this message...
 
    
leon jollans
you can use it almost the same way as in classic ASP, except as an ICollection, you need to use the Add method, and cast back

eg,

Session.Add ( key , object );

objectType obj = (objectType)Session["key"];

-----Original Message-----
From: Scott.Wiseman [mailto:Click here to reveal e-mail address]
Sent: 12 August 2002 17:07
To: aspngfreeforall
Subject: [aspngfreeforall] RE: accessing session in a server control

any examples of this?

-----Original Message-----
From: chris [mailto:Click here to reveal e-mail address]
Sent: Monday, August 12, 2002 7:44 AM
To: aspngfreeforall
Subject: [aspngfreeforall] RE: accessing session in a server control

HttpContext.Current.Session

-Chris Frazier
.NET Solution Developer
Velocity Databank, Inc.
www.velocitydatabank.com

-----Original Message-----
From: Chris [mailto:Click here to reveal e-mail address]
Sent: Friday, August 09, 2002 5:58 PM
To: aspngfreeforall
Subject: [aspngfreeforall] accessing session in a server control

Is it possible to access Session information from within a server control? If so, what is the best way to do so?

Thanks in advance,
Chris
| ASP.net DOCS = http://www.aspng.com/docs | [aspngfreeforall] member Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/aspngfreeforall = JOIN/QUIT | news://ls.asplists.com = NEWSGROUP

| ASP.net DOCS = http://www.aspng.com/docs | [aspngfreeforall] member Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/aspngfreeforall = JOIN/QUIT | news://ls.asplists.com = NEWSGROUP

| ASP.net DOCS = http://www.aspng.com/docs | [aspngfreeforall] member Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/aspngfreeforall = JOIN/QUIT | news://ls.asplists.com = NEWSGROUP
Reply to this message...
 
    
chris
MessageHere's an article on the topic:

http://aspalliance.com/bbilbro/DesktopDefault.aspx?tabindex=1&tabid=7&Articl
eID=5

-Chris Frazier
.NET Solution Developer
Velocity Databank, Inc.
www.velocitydatabank.com

-----Original Message-----
From: leon jollans [mailto:Click here to reveal e-mail address]
Sent: Monday, August 12, 2002 11:58 AM
To: aspngfreeforall
Subject: [aspngfreeforall] RE: accessing session in a server control

you can use it almost the same way as in classic ASP, except as an
ICollection, you need to use the Add method, and cast back

eg,

Session.Add ( key , object );

objectType obj = (objectType)Session["key"];

-----Original Message-----
From: Scott.Wiseman [mailto:Click here to reveal e-mail address]
Sent: 12 August 2002 17:07
To: aspngfreeforall
Subject: [aspngfreeforall] RE: accessing session in a server control

any examples of this?
-----Original Message-----
From: chris [mailto:Click here to reveal e-mail address]
Sent: Monday, August 12, 2002 7:44 AM
To: aspngfreeforall
Subject: [aspngfreeforall] RE: accessing session in a server control

HttpContext.Current.Session

-Chris Frazier
.NET Solution Developer
Velocity Databank, Inc.
www.velocitydatabank.com

-----Original Message-----
From: Chris [mailto:Click here to reveal e-mail address]
Sent: Friday, August 09, 2002 5:58 PM
To: aspngfreeforall
Subject: [aspngfreeforall] accessing session in a server control

Is it possible to access Session information from within a server
control? If so, what is the best way to do so?

Thanks in advance,
Chris
| ASP.net DOCS = http://www.aspng.com/docs | [aspngfreeforall] member
Click here to reveal e-mail address = YOUR ID |
http://www.asplists.com/aspngfreeforall = JOIN/QUIT | news://ls.asplists.com
= NEWSGROUP
| ASP.net DOCS = http://www.aspng.com/docs | [aspngfreeforall] member
Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/aspngfreeforall
= JOIN/QUIT | news://ls.asplists.com = NEWSGROUP
| ASP.net DOCS = http://www.aspng.com/docs | [aspngfreeforall] member
Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/aspngfreeforall JOIN/QUIT | news://ls.asplists.com = NEWSGROUP | ASP.net DOCS http://www.aspng.com/docs | [aspngfreeforall] member
Click here to reveal e-mail address = YOUR ID |
http://www.asplists.com/aspngfreeforall = JOIN/QUIT | news://ls.asplists.com
= NEWSGROUP
Reply to this message...
 
 
System.Collections.ICollection
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