Access to an object created in page from a class
<p>I have a page, Default.aspx, with its own code-behind file like this:</p>

<pre><code>    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;

    public partial class _Default : System.Web.UI.Page 
    {
        public int[] anArray;
...
    }
</code></pre>

<p>What I'd like to do is access to "anArray" from a C# class (not tied to a page) declared in \App_Code folder. What can I do?</p>

<p>Thanks.</p>

<p>Edit: As said in the first comment, I really apreciate your suggestions about refactoring my connection objects. However, what I'm really doing here is to rewrite an old PHP application in order to get comfortable with basic C# and ASP.NET, so this code will never go really live. So, I'm still intersted in a way (if any) to access an object declared in a code-behind code from a standard C# class. </p>

<p>Edit2: I removed the OdbcConnection object in order to focus to the real problem: how to refer to an object istantiated in a code-behind file from a C# class situated in \App_Code?</p>
