namespace StateManagement
{
public partial class ApplicationExample1_Results :
System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// Lock
the Application object so no other updating can be done to this object.
Application.Lock();
//
Retrieve the total number of votes by all users of the web application.
int count = (int)Application["VoteCount"];
String str = "";
str = "Christopher
M. Pascucci: " +
Application["Christopher M. Pascucci"].ToString() + "<br />";
str = str + "George Clooney: " +
Application["George Clooney"].ToString() + "<br />";
str = str + "Matt Damon: " +
Application["Matt Damon"].ToString() + "<br />";
str = str + "Denzel Washington: " + Application["Denzel
Washington"].ToString()
+ "<br
/>";
lblResults.Text
= str;
// Unlock the Application object so others can use it.
Application.UnLock();
}
}
}