Code Listing: Application State
This code goes into Global.asaxWrite a value to Application State
Application["Message"] = "Welcome to the Contoso site.";
Application["PageRequestCount"] = 0;
Read a value from the Application stateApplication.Lock();
Application["PageRequestCount"] = ((int)Application["PageRequestCount"])+1; Application.UnLock();
No comments:
Post a Comment