I am a little confused. Maybe I am thinking too simply, but on any page
you have access to the Page.Session object. Therefore:
class MyWebPage : Page
{
...
if (this.Session.IsNewSession)
{
this.Session["MyNewObject"] = new foobar();
}
Foobar myfoobar = this.Session["MyNewObject"] as foobar;
(all of the this's are to be clear where the object is coming from, they
aren't really needed0
Thanks,
Shawn Wildermuth
[EMAIL PROTECTED]
> -----Original Message-----
> From: The DOTNET list will be retired 7/1/02
> [mailto:[EMAIL PROTECTED]] On Behalf Of Gagne, Chris
> Sent: Sunday, June 02, 2002 8:56 AM
> To: [EMAIL PROTECTED]
> Subject: [DOTNET] Passing objects in Session State
>
>
> Could someone be so kind as to point me in the direction of a
> good sample on storing objects in ASP.Net session state?
> Searched the archive and havnt really been able to dig up
> what I need. From what I've gathered so far I understand I
> need to inherit from iSerializable and what not but havnt
> been able to dig up a solid sample.
>
> Many thanks.
>
> You can read messages from the DOTNET archive, unsubscribe
> from DOTNET, or subscribe to other DevelopMentor lists at
> http://discuss.develop.com.
>
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.