Read ASP 3 Session Data

  • Thread starter Thread starter Thom Little
  • Start date Start date
T

Thom Little

I create session data in ASP 3 using ...
Session("sample") = "test"

I can extract the value on any ASP 3 page using ...
Demo = Session("sample")
.... until the session is terminated.

How do I extract the information in an .ASPX page using C#?

string Demo = Session["sample"] ;
.... is not the answer.

I am apparently missing some very obvious point (as is my nature
apparently).

.... Thom
___________________________________________________
Thom Little - www.tlanet.net - Thom Little Associates, Ltd.
 
Hello Thom,

TL> string Demo = Session["sample"] ;
TL> ... is not the answer.

why? What's wrong with that?

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


TL> I create session data in ASP 3 using ...
TL> Session("sample") = "test"
TL> I can extract the value on any ASP 3 page using ...
TL> Demo = Session("sample")
TL> ... until the session is terminated.
TL> How do I extract the information in an .ASPX page using C#?
TL>
TL> string Demo = Session["sample"] ;
TL> ... is not the answer.
TL> I am apparently missing some very obvious point (as is my nature
TL> apparently).
TL>
TL> ... Thom
TL> ___________________________________________________
TL> Thom Little - www.tlanet.net - Thom Little Associates, Ltd.
 
Thom,
You'll need to Google for sharing session state between asp and ASP.Net.
It's a little too tricky to fit the ideas into a newsgroup post. You can't
do this automatically because classic ASP, and ASP.Net aren't handled by the
same methods so they're in different application spaces from eachother. So
you have to do some more fancy tricks to share an ASP session with an
ASP.Net session because, even though they have the same name and look the
same, they are two different mechanisms.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression
 
That supports the conclusion that I reached by experimentation. Due to my
limited vocabulary on the subject I did not know what to Google.

With your help I now have the answer.

My solution will be separate ASP 3 and ASP.NET environments and I will not
attempt to merge them.

Thanks for the help.

.... Thom
___________________________________________________
Thom Little - www.tlanet.net - Thom Little Associates, Ltd.
 
It works among ASP 3 modules. It works among ASP.NET modules. It cannot be
readily shared between an ASP3 and an ASP.NET module.

The two implementations seem to use very similar names for capabilities that
are different in each and not shared.

.... Thom
___________________________________________________
Thom Little - www.tlanet.net - Thom Little Associates, Ltd.
 
Hello Thom,

Google and u find number of articles how to share asp session among asp and
asp.net http://www.google.com/search?q=asp.net+share+session+asp

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


TL> It works among ASP 3 modules. It works among ASP.NET modules. It
TL> cannot be readily shared between an ASP3 and an ASP.NET module.
TL>
TL> The two implementations seem to use very similar names for
TL> capabilities that are different in each and not shared.
TL>
TL> ... Thom
TL> ___________________________________________________
TL> Thom Little - www.tlanet.net - Thom Little Associates, Ltd.
 
Back
Top