storing my own information in the Request object

  • Thread starter Thread starter Andy Fish
  • Start date Start date
A

Andy Fish

Hi,

Is there anywhere inside the HttpRequest object that I can use to store my
own information? from what I can see things like ServerVariables are made
read-only.

If not, does anyone else have a sensible strategy for storing information
that pertains to a particular request so that it can be shared between
global.asax handlers and the page itself? I cannot use session state for
this.

TIA

Andy
 
viewstate("yourValiableNameWhichPersistsDuringPostback")
session("VariableAvailableOnlyToYouForYourSession")
application("availableToAnyoneUsingTheApp")
 
thanks but none of those help me

i want something that is specific to this request - specifically

(a) I can set in the global.asax Application_BeginRequest handler and
retrieve in the page itself

(b) is not shared between concurrent requests on the same session
 
i want something that is specific to this request - specifically

(a) I can set in the global.asax Application_BeginRequest handler and
retrieve in the page itself

That's what the Session object is for...
(b) is not shared between concurrent requests on the same session

When you put something in the Session object, it isn't *shared* between
concurrent requests per se - it is *available* to all requests, which is not
the same thing...
 
you want the HttpContext.Items collection. it designed for this.

-- bruce (sqlwork.com)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top