What do you mean by application variables? How:
private int _key = 0;
If so, these variables are not saved between web requests. When the page is unloaded, and you should use a session or cache or viewstate to save them, for example:
ViewState["Key"] = 1;
or
Session["Key"] = 1;
And reload it here when the page loads again. If you mean something else, please comment and I will update the answer.
EDIT: For the application, check:
- , .