Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2008

Tip: Looking for answers? Try searching our database.

Read ASP 3 Session Data

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Thom Little - 23 Feb 2008 07:49 GMT
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.
Michael Nemtsev [MVP] - 23 Feb 2008 12:36 GMT
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 Little - 23 Feb 2008 14:03 GMT
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.
Michael Nemtsev [MVP] - 23 Feb 2008 23:23 GMT
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.
Mark Fitzpatrick - 23 Feb 2008 13:22 GMT
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

>I create session data in ASP 3 using ...
> Session("sample") = "test"
[quoted text clipped - 14 lines]
> ___________________________________________________
>   Thom Little  -  www.tlanet.net  -  Thom Little Associates, Ltd.
Thom Little - 23 Feb 2008 14:00 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.