Alexandre Brisebois
Alexandre Brisebois

Reputation: 6753

Scope of HttpContext.Current.Items

Are the HttpContext.Current.Items lost when a Server.Transfer(); occurs?

If so what is the best way for me to send information to another page without going through the Session?

Upvotes: 14

Views: 15297

Answers (2)

Restuta
Restuta

Reputation: 5903

You can access Page.PreviousPage property with all data on it when using Server.Transfer(). And also yes, context would be valid.

Upvotes: 1

John Lechowicz
John Lechowicz

Reputation: 2583

Yes, the context would still be valid. It would become invalid or break if you use Response.Redirect().

See article The HttpContext Items Collection

Upvotes: 15

Related Questions