Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
320
WebAsyncRefreshPanel and System.Web.UI.WebControls.Login
posted

I'm using the Microsoft Login component on my login page. After a user is logged in it will not redirect to another page defined in the DestinationPageUrl or using a Server.Redirect in the Loggedin event.

It just sits there...

If I turn off the Warp Panel it works fine.

 Any suggestions? 

 

Parents
  • 24497
    posted

    Hi Bob,

    Unfortunately the WARP, within its private async postback, does not support server redirect action. To redirect, that action should be moved from a child control (like internal action of "Login") into explicit "redirect" action of WARP. To redirect, you may use window.location or similar. Below is example:

    protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
    {
      ...
     
    // condition when logic is successful
     
    if(e.Authenticated)
      {
       
    // supress default redirect action of login
       
    e.Authenticated = false;
       
    // supress dummy error message
       
    this.Login1.FailureText = "";
       
    // explicitly redirect to desired page (value for DestinationPageUrl)
        
    Infragistics.WebUI.Shared.CallBackManager.AddScriptBlock(this, this.WebAsyncRefreshPanel1, "window.location='./Destination.aspx'");
      }
      ...
    }

Reply Children