Link to home
Create AccountLog in
Avatar of Russ Suter
Russ Suter

asked on

How to retrieve an instance of HttpApplicationState

I have been using the Application property of the System.Web.UI.Page class frequently. However, I want to centralize some of the functions that use this object in my Business Logic Layer which doesn't inherit from the System.Web.UI.Page class. How can I use this object in my Business Logic Layer class?
Avatar of mjhoagland
mjhoagland

You can pass it as a parameter to your business logic layer.  That way you can know the reference is always up to date.
ASKER CERTIFIED SOLUTION
Avatar of Sammy
Sammy
Flag of Canada image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Russ Suter

ASKER

Seems simple enough. I can just refer to HttpContext.Current.Application whenever I need the instance. Thanks!