User1909155429 posted
To open my page users need to login.
What happens is users click button to open page in the modal dialog. when not logged in the login page appears inside modal window and remains open once user authenticated
and current page shown in new modal window on top of the login window ?
I need to either close login page after authentication process or else programmatically redirect user back to current page after login from code:
Using the aforementioned script does not return back to current page.
Protected
Sub
ButtonPopup_Click(ByVal
sender As
Object,
ByVal
e As
System.EventArgs)
Handles
ButtonPopup.Click
If User.Identity.IsAuthenticated = False Then
Response.Redirect("~/Project/Authenticate/Login.aspx")
End If
Page.ClientScript.RegisterStartupScript(Me.GetType(),
"PopUp",
"window.showModalDialog('..\Project\Details.aspx',
'test', 'dialogWidth:830px;dialogHeight:800px;resizable:no;scrollbars:no'); ",
True)
End Sub