user control event fires after content page page_load

Discussion in 'ASP .Net' started by mortb, May 4, 2004.

  1. mortb

    mortb Guest

    Hi.

    I have a page that has a user control as a header on it:

    -------------------------------------------------------------------
    | Header linkButton: logout |
    -------------------------------------------------------------------
    | Content page |
    | |
    | List of items |
    | ------------- |
    | Item1 |
    | Item2 |
    | etc... |
    | |
    | |
    -------------------------------------------------------------------

    (this user control header is to be used on all pages of my site)

    As you can see from the draft above the header user control has a link to log out.
    In the code behind the click event for this linkbutton calls FormsAuthenticaiton.SignOut.
    My problem is that this does not redirect the user to the log in page specified in the web.config.
    Instead the content page is displayed as if reloaded.
    The user has to click the logout link two times(!) for him to be signed out and redirected.
    I've tried to Response.Redirect to the login page from the link button click event, but as I have included the
    header control on the login page as well this causes an infinite loop.

    Any suggestions?
    I think it would be neat if I can find a solution to this one, instead of having to re-think and re-write.

    cheers,
    mortb
     
    mortb, May 4, 2004
    #1
    1. Advertising

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. Jon
    Replies:
    1
    Views:
    11,475
    George Ter-Saakov
    Jan 13, 2004
  2. rockdale
    Replies:
    1
    Views:
    685
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Nov 16, 2006
  3. Max2006
    Replies:
    2
    Views:
    1,618
    Walter Wang [MSFT]
    Sep 19, 2007
  4. Fabrizio
    Replies:
    5
    Views:
    257
    Alessandro Zifiglio
    Feb 24, 2004
  5. Replies:
    3
    Views:
    1,022
Loading...

Share This Page