Login Control - Response.Redirect
<p>I have a usercontrol on a page that has a login control in it.  This controls the display of another user control (if the user is not logged in they get the login control user control).  I have some authentication code (see below) that runs when the user clicks the "Login" button.  Basically I want it to post back to the same page so they will be logged in and able to now see the other protected user control.  This code is not working.  Perhaps there is something going on in another page that is making this not work, but does this code itself seem like it should work?</p>

<p>string userName = Membership.GetUserNameByEmail(Login1.UserName);</p>

<pre><code>    if (userName != null)
    {
        e.Authenticated = Membership.ValidateUser(userName, Login1.Password);
    }
    else
    {
        e.Authenticated = false;
    }

    if (e.Authenticated)
    {
        Login1.UserName = userName;
        ImageButton loginButton = (ImageButton)Login1.FindControl("LoginButton");
        if (loginButton != null)
        {
            //loginButton.PostBackUrl = Request.Url.ToString();                
            Response.Redirect(Request.Url.ToString());
        }
    }
</code></pre>
