/// <summary> /// OnClick event handler for cancel impersonation. /// </summary> protected void lnkCancelImpersonate_OnClick(object sender, EventArgs e) { AuthenticationHelper.CancelImpersonation(); if (AuthenticationMode.IsFormsAuthentication()) { PortalScriptHelper.RegisterAdminRedirectScript(Page); } else { URLHelper.Redirect(RequestContext.CurrentURL); } }