Retrieving objects between classes
<p>I always get tied up with small things like this... I need to access an objects properties created in class 'Login' from my welcome page class 'Default'. When I try to reference the class so that I may access the object, VS 2010 doesn't list it as available like it normally would, and forcing the request just returns an error.</p>

<p>My <code>Login</code> Class is defined like so:</p>

<pre><code>public abstract class Login : System.Web.UI.UserControl
{
   ...
   private void Login_click(object sender, EventArgs e)
   {
      MyObject myObject = new MyObject();
      myObject.property1 = "something";
   }
}
</code></pre>

<p>And then i wish to access <code>myObject</code> from my default class, like this:</p>

<pre><code>public class Default : System.Web.UI.Page
{
   ...   
   private void Page_load(object sender, System.EventArgs e)
   {
      string someLocalVar = Login.myObject.property1;
   }
}
</code></pre>

<p>Where <code>property1</code> is a property set in the Login class. This does not work, however, and VS doesn't even recognize the Login class; instead it treats it as a reserved word of some sort. These two files are in the same project, so that shouldn't be an issue in the <code>using</code> section. I've accessed variables in this manner between other classes before, just not this time for some reason.
Thanks!</p>
