I have an asp.net website StartPage that does not require signing-in, in order to view it. On this StartPage, there is a Login linkbutton that when clicked opens a small Login popup page. Unfortunately, after the user has entered their loin credentials and clicks login, the destination page loads in the same popup window which is not my desired result.
What i would like is when the user has successfully been authenticated, the popup Login window should close and redirect the user to the destination page, but this destination page should load in the original main window.
This is the function that opens the popup windows
function PopupCenter(pageURL, title, w, h) {
var left = (screen.width / 2) - (w / 2);
var top = (screen.height / 2) - (h / 2);
var targetWin = window.open(pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
}
And the linkbutton OnClient property is like so
<asp:LinkButton ID="LinkButton2" runat="server"
onclientclick="PopupCenter('Login.aspx', 'myPop1',400,300);">Log Me In</asp:LinkButton>