the login control always reload the page if there is no destination set

Discussion in 'ASP .Net' started by Jerry Qu, Feb 18, 2009.

  1. Jerry Qu

    Jerry Qu Guest

    Hi All,

    I just found that the login control will always reload the page after the
    postback, if it is logged in. Is it the way it should be?

    or is it a way to prevent the reload?


    Jerry Qu, Feb 18, 2009
    1. Advertisements

  2. Jerry Qu

    Stan Guest

    It depends on how the page with the login control was reached. If they
    get their via an ordinary link from a page that can be accessed
    anonymously (or request it directly via the address bar) then the
    behaviour you observe will occur. If the user requests a page that
    requires authentication they will be directed to the login page
    automatically, then, once they have logged in successfully, will be
    redirected back to the original page.

    If you wish to cater for the first scenario then use the OnLoggedIn
    event of the Login control to redirect the user to another page.

    Stan, Feb 19, 2009
    1. Advertisements

  3. Jerry Qu

    Jerry Qu Guest


    But I don't want the either reload after the postback or to go to another
    page. I just want to postback and stay at the same page. Is there any way?

    Jerry Qu, Feb 19, 2009
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.