Context.Items vs Context.Handler (passing values between pages)

Discussion in 'ASP .Net' started by VS_NET_DEV, May 24, 2004.

  1. VS_NET_DEV

    VS_NET_DEV Guest

    Hi All,
    There two ways of passing values between pages -
    1) Context.Items.Add
    2) Context.Handler (cast the page1 class etc)

    I know for sure #2 does not store the values between requests.
    How about #1. Does it store values between requests? i.e.

    The Context.Items. collection
    A)Is it like the Session variables?
    OR
    B) is it valid only for the duration of the request?

    Thanks
    Jenny2
     
    VS_NET_DEV, May 24, 2004
    #1
    1. Advertising

  2. Nope. the life span of the Context object of for one request. You'd have to put it in session state, view state, hidden input field, something like tha
     
    =?Utf-8?B?Sm9obg==?=, May 24, 2004
    #2
    1. Advertising

  3. VS_NET_DEV

    jenny Guest

    jenny, May 25, 2004
    #3
    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. cgia
    Replies:
    5
    Views:
    768
    Steve C. Orr, MCSD
    Jul 26, 2003
  2. Matt M
    Replies:
    1
    Views:
    1,091
    Matt M
    Aug 28, 2003
  3. Greg Decos
    Replies:
    2
    Views:
    411
    Greg Decos
    Apr 15, 2004
  4. John

    Passing values between pages

    John, Oct 8, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    451
    Xavier Pacheco
    Oct 8, 2004
  5. Shankar Ayyachamy
    Replies:
    4
    Views:
    527
    IPGrunt
    Jan 28, 2005
Loading...

Share This Page