Page_Load not firing first consistently

M

mollyf

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.

Thanks.

Molly J. Fagan
Oklahoma Foundation for Medical Quality
 
G

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.
 
M

mollyf

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
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top