Session object in a class?

Discussion in 'ASP .Net' started by Me, Oct 16, 2003.

  1. Me

    Me Guest

    How can I make the session object available for a class I
    am building for use in web pages? I want the class to
    manage saving itself to, and retrieving itself from the
    session object.

    Thanks
    Me
     
    Me, Oct 16, 2003
    #1
    1. Advertising

  2. You will need to look into the

    System.Web.HttpContext.Current.Session to have access to it, but you should
    also consider design time behavior and check to make sure the
    HttpContext.Current is not null before accessing the Session portion of it.

    HTH,

    bill

    "Me" <> wrote in message
    news:00d701c3940a$2c481090$...
    > How can I make the session object available for a class I
    > am building for use in web pages? I want the class to
    > manage saving itself to, and retrieving itself from the
    > session object.
    >
    > Thanks
    > Me
     
    William F. Robertson, Jr., Oct 16, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Smythe
    Replies:
    3
    Views:
    1,305
    Jeff Smythe
    Jan 2, 2004
  2. E11
    Replies:
    1
    Views:
    4,902
    Thomas Weidenfeller
    Oct 12, 2005
  3. momo898
    Replies:
    2
    Views:
    512
    bruce barker \(sqlwork.com\)
    Oct 12, 2006
  4. Don Miller
    Replies:
    4
    Views:
    607
    Don Miller
    Feb 6, 2007
  5. =?Utf-8?B?Um9iSEs=?=
    Replies:
    4
    Views:
    5,392
    =?Utf-8?B?Um9iSEs=?=
    Apr 11, 2007
Loading...

Share This Page