Problem with Session unpack
<p>I have some problems with this code:</p>

<pre><code>    private void BoxVisibility(bool email, bool link, Control linkButton)
    {
        mainEmail.Visible = email;
        foreach (Control c in PlaceHolder1.Controls)
        {
            c.Visible = false;
        }
        if (linkButton != null)
        {
            PlaceHolder1.Visible = true;
            linkButton.Visible = link;
        }

    }
</code></pre>

<p>when I send to method Control all is ok, but when at first I put Control in <code>Session['temp'] = Control</code>, and then invoke the method like <code>BoxVisibility(false, true, (Control) this.Session['temp'])</code> in this case <code>Control linkButton.Visible = link;</code> doesn't take <code>true</code>, He's still remain <code>false</code>.</p>
