On my Master Page, I have a little method in the Page_Load event that checks to see if a user is logged in, and redirects them to the Login page if not.
The problem is that for some of my pages the Page_Load events presume a users logged are in, and these events seems to fire before the login check in the master page, which causes errors.
What are some ways around this? Any events I can use other than Page_Load in my pages, that’ll fire after the master page?
You have a rich Page Cycle with lots of events to use.
Perhaps you could use
Page_Initto check if the user is logged-in in the Master Page.Or use
Page_PreRenderin the other pages.