开发者

Application object access from regular class in ASP.Net

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜