Read ASP 3 Session Data

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.
 
M

Michael Nemtsev [MVP]

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.
 
M

Mark Fitzpatrick

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
 
T

Thom Little

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.
 
T

Thom Little

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.
 
M

Michael Nemtsev [MVP]

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.
 

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

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top