Closing a dedicated login page

Discussion in 'ASP .Net Web Controls' started by Jeremy, Nov 21, 2007.

  1. Jeremy

    Jeremy Guest

    I want to use a popup login page and automatically close it when the user
    authenticates. In my OnLoggedIn event handler in the code behind in the
    popup page, I have the following:

    protected void OnLoggedIn(object sender, EventArgs e)
    {
    oSessionControl.showProgress("Authentic!!");
    Response.Write ("<script language =
    javascript>close();</script>");
    }

    However, the popup window does not close. Instead, the login document seems
    to close and the calling page displays in the same window. So at that point,
    I have 2 browser windows open and visible. Any clues?
    --
    Jeremy
     
    Jeremy, Nov 21, 2007
    #1
    1. Advertisements

  2. Hi, Jeremy,

    I'd replace the "close()" for "window.close();"

    and add a Response.End() after the Response.Write

    Regards,

    Paulo Santos
    http://pjondevelopment.50webs.com

    On Nov 21, 6:25 pm, Jeremy <> wrote:
    > I want to use a popup login page and automatically close it when the user
    > authenticates. In my OnLoggedIn event handler in the code behind in the
    > popup page, I have the following:
    >
    > protected void OnLoggedIn(object sender, EventArgs e)
    > {
    > oSessionControl.showProgress("Authentic!!");
    > Response.Write ("<script language =
    > javascript>close();</script>");
    > }
    >
    > However, the popup window does not close. Instead, the login document seems
    > to close and the calling page displays in the same window. So at that point,
    > I have 2 browser windows open and visible. Any clues?
    > --
    > Jeremy
     
    PJ on Development, Nov 22, 2007
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hermit Dave

    Forms Login Page Not Login Out

    Hermit Dave, Jan 12, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    769
    Hermit Dave
    Jan 13, 2004
  2. Sasquatch
    Replies:
    2
    Views:
    1,576
    Sasquatch
    Oct 3, 2006
  3. Sasquatch
    Replies:
    2
    Views:
    673
    Sasquatch
    Oct 4, 2006
  4. vikramp
    Replies:
    2
    Views:
    1,434
    vikramp
    Oct 20, 2006
  5. =?Utf-8?B?Vk1J?=

    Closing popup window when closing parent window?

    =?Utf-8?B?Vk1J?=, Feb 14, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    897
    Thomas Hansen
    Feb 15, 2007
  6. Shannon

    login page stays on login page

    Shannon, Jan 9, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    772
    Shannon
    Jan 9, 2008
  7. Pascal Blanchard
    Replies:
    0
    Views:
    397
    Pascal Blanchard
    Aug 17, 2004
  8. thomas
    Replies:
    0
    Views:
    422
    thomas
    Oct 23, 2003
Loading...