Static variable in asp.net page
I am having one doubt regarding the use of static variable in Asp.net pages.
I am having one doubt regarding the use of static variable in Asp.net pages.
At the moment I am working on a project admin application in C# 3.5 on ASP.net. In order to reduce hits to the database, I’m caching a lot of information using static variables. For example, a list of users is kept in memory in a static class. The class reads in all the information from the database on startup, and will update the database whenever changes are made, but it never needs to read from the datebase.
If I have the following code: