Avoid Page_Load to effect my array, using AJAX
<p>I have a textbox that the user suppose to place numbers on it,
and after he push the button, the number should pass to an array.</p>

<p>and each number and button pushed, should be saved in this array in order (for example : 3 , 4, 5, ....)</p>

<p>The problem is, that each time I push the button, then <code>page_load</code> occurs. I have this code :</p>

<pre><code>    protected string[] CurrentArr;

    protected void Page_Load(object sender, EventArgs e)
    {

        if (CurrentArr != null)
        {
            CurrentArr = (string[])Session["CurrentArr"];      
        }
        else
            CurrentArr = new string[length];
</code></pre>

<p>which <code>CurrentArr</code> is the array that change over time.</p>

<p>I tried to solved it with AJAX as well :</p>

<pre><code>&lt;asp:ScriptManager runat="server" ID="sm"&gt;
    &lt;/asp:ScriptManager&gt;

    &lt;asp:UpdatePanel runat="server" ID="update"&gt;
        &lt;ContentTemplate&gt;
        &lt;input type="text" class="response" id="how_many" name="guess" placeholder="Enter your guess..." /&gt;
        &lt;asp:Button runat="server" class="button red" id="generate" name="generate" value="Generate!" OnClick="guess_Click" /&gt;
        &lt;asp:Button runat="server" class="button red" id="win" name="win" value="you won"   /&gt;
        &lt;/ContentTemplate&gt;
    &lt;/asp:UpdatePanel&gt;
</code></pre>

<p>but it has no effect over my array (although my page doesnt post back...)</p>

<p>anyone has a solution ?</p>

<p>Thanks!</p>
