In C# there is a class ThreadLocal. You can use it to define a static field that only exist within the scope of a thread.
I am looking for something similar for use in an ASP Custom Control. I need to define a static field that is shared between all instances of this control, within the scope of a request.
Does there exist something out of the box for it?
You can use the HttpContext.Items
dictionary that is associated with each request.
In ASCX code, for example:
this.Context.Items.Add("key", value);
See Documentation