Postback collapsing fields
<p>I've got a login button with he following code.</p>

<pre><code>protected void prv_Click(object sender, EventArgs e)
{

    if (Page.IsPostBack)
    {
        if (!HttpContext.Current.Request.IsSecureConnection)
        {
            string postbackUrl = HttpContext.Current.Request.Url.AbsoluteUri.Replace("http", "https");
            Response.Redirect(postbackUrl);

        }
    }

    login_box.Visible = true;
}
</code></pre>

<p>The problem is, if the user is browsing using http and clicks on login link which fires off the prv_Click, the site redirects you to https which is correct, but the login_box which is standard div set to visible false and run at server never gets set to true. The user has to click on the login link again which then expands it.</p>

<p>Any help would be appreciated.   </p>
