I am trying to create a window for use with the asp:login control, but having trouble getting the window to close when logged in automatically.
1) I created a User Control that has a LoginView, showing a button of "Login" or "Logout" accordingly to current status. This control will always be at the top right of every page (master page). When clicked, it opens a window that points to the loginpage.aspx.
2) Loginpage.aspx has a LoginView that shows the Login control and the LoginStatus appropriately. Within the Login control's template I added a button [Cancel] that closes the window.
What I would like is when user clicks the [Login] button, that it automatically closes the window and refreshes the parent. Problem I am finding is trapping the code to perform this.
1) I created a User Control that has a LoginView, showing a button of "Login" or "Logout" accordingly to current status. This control will always be at the top right of every page (master page). When clicked, it opens a window that points to the loginpage.aspx.
2) Loginpage.aspx has a LoginView that shows the Login control and the LoginStatus appropriately. Within the Login control's template I added a button [Cancel] that closes the window.
What I would like is when user clicks the [Login] button, that it automatically closes the window and refreshes the parent. Problem I am finding is trapping the code to perform this.
- Using the OnLoggedIn event and codebehind, I can do a Request.Redirect, but I don't know the parent nor does the redirect work properly (redirects within window).
- Java script, I can get the parent window and redirect, but can't get the code to call the script.
- Tried combining prior to by injecting script out to label control on the OnLoggedIn event, but that didn't seem to work.
I am using VS 2008 and find attempting to debug is very difficult given the CMS system this is built upon and the various relative paths in it (VS 2008 wants to create port/instances for debugging, changing the effective URL).
Any thoughts on how to accomplish this?