 <p>The <a href="http://msdn.microsoft.com/en-us/library/wxh6fsc7%28v=vs.100%29.aspx" rel="nofollow">access modifier</a> needs to be at least <a href="http://msdn.microsoft.com/en-us/library/bcd5672a%28v=vs.80%29.aspx" rel="nofollow"><code>protected</code></a>.</p> <pre><code>protected String myString = "Hi SO!"; </code></pre> <p>The reason behind is that each <code>.aspx</code> page inherits from the code-behind class.</p>