Our teachers (coaches for this project) suggested to store our DAO objects in the Application object, so there's one object of开发者_开发技巧 each available for the whole application.
This Application object is easily accessed in the Page codebehind itself, but how do we access it from a plain class that is not extending anything?
For code in classes, you can use HttpContext.Current.Application
, for which you need to import the System.Web
namespace.
精彩评论