"Larry Charlton" <La***********@discussions.microsoft.com> wrote in message
news:43**********************************@microsof t.com...
No ideas on reversing them. Conceptually it make sense if you think of
the
content page as being the real page that the master gets added to. If you
have a super master then it would get added to that master so from a call
chain it makes sense that you start with the content then call it's master
and then call it's master.
What are you trying to do? In general you'll have much better luck if you
always assume an event could always happen at a random time and in a
random
order.
Hi Larry and Chris -
Thanks for the replies. I had the mindset that the master page and content
page have the same relationship as a derived and base class. I see what
you're saying about the 'added to' philosophy. Makes much more sense now,
thanks.
I'm trying to implement security. The page_load of a master page seemed a
convenient way to add security to a large group of web pages. The page_load
checks the users session and redirects to a login page if the user isn't
logged in. The login page is also passed a return url.
It works in a practical sense. The end result is what I want. But too many
page_load methods are being called and the extra processing is thrown away.
Here's an example:
User opens "Orders" page (requires login), Content.Page_Load() is executed
which queries the order table, Master.Page_Load() is executed which notices
the user isn't logged in and redirects to Login.aspx?returnurl=orders. The
Content.Page_Load() is needlessly executed.
I'm probably trying to reinvent the wheel with security. Is there something
precanned that will do the login stuff and the return url?
Thanks!