Page_Load not firing first consistently

Discussion in 'ASP .Net' started by mollyf, May 27, 2005.

  1. mollyf

    mollyf Guest

    I have a web application where I have my users log in and it takes them
    to default.aspx. On that page, I have 2 user controls. Everything
    works fine the first time a person logs in. I have a logout button on
    one of the user controls which takes the user back to the login screen.
    If the user tries to log in again without closing the browser window,
    the Page_Prerender in the user control gets fired before the Page_Load
    in default.aspx and because the datagrid on the user control relies on
    values set in a dropdownlist box on default.aspx, the code breaks
    because nothing is set.

    How do I force default.aspx to load first every time? Why are things
    loading differently the second time the user logs in? I set
    breakpoints through the code to verify this.


    Molly J. Fagan
    Oklahoma Foundation for Medical Quality
    mollyf, May 27, 2005
    1. Advertisements

  2. mollyf

    Guest Guest

    Just don't allow them to go back to the login page. Normally once you've
    logged into a site/application/service you can log out but not back in again.
    Guest, May 27, 2005
    1. Advertisements

  3. mollyf

    mollyf Guest

    I'm sorry but I disagree with your statement. I've seen and used many
    web applications that allow you to log out and then log back in again.
    In fact, I can't think of one web site that doesn't allow for that
    because they're *user-friendly*.

    The more I've thought about this problem, the more I'm thinking it's
    related to caching.

    Molly J. Fagan
    Oklahoma Foundation for Medical Quality
    mollyf, May 31, 2005
    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.