Wednesday May 4th

Tuesday May 3rd

Monday May 2nd

3 Kicks

Static Singletons for ASP.NET Controls

When building generic ASP.NET Server controls that also provide a sort of API service to other custom controls or page level code, it's often necessary to ensure that only a single instance of a control exists, and that only that single instance of this control or component can be accessed in the context of an ASP.NET request. Using HttpContext and it's Item collection makes it easy to create reusable, cacheable instances and ensure you're only running a Singleton instance of it.

0 comments

Commenting on Stories is limited for now and will open up to those recommended by the community. Learn how
Loading DotNetKicks...
brought to you by the Kicks Network