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

  • Thread starter Thread starter VS_NET_DEV
  • Start date Start date
V

VS_NET_DEV

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
 
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
 
Back
Top