Static Variables somehow maintaining state?
<p>I am working on an existing project, setup by another coder. I'm having some trouble understanding how state is being maintained between pages. There is a Class library which has some helper objects. Mostly these objects are just used for there static methods and rarely instantiated or inherited.</p>

<p>This is an example class I'm testing with.</p>

<pre><code>public sealed class Application
{
    public static string Test;
}
</code></pre>

<p>Now when i run something like the following in the base class of my page, I would expect the result to be "1: 2:Test" all the time (note that "1" is empty), but strangly its only this way the first time it is run. Then every time afterwards its "1:Test 2:Test". Somehow its maintaining the state of the static variable between pages and being refreshed??</p>

<pre><code>Response.Write("1:" + SharedLibrary.Application.Test);

SharedLibrary.Application.Test = "Test";

Response.Write(" 2:" + SharedLibrary.Application.Test);
</code></pre>

<p>I need to create more classes like this, but want to understand why this is occurring in the first place.</p>

<p>Many Thanks</p>
