master page needs to validate before child page

Discussion in 'ASP .Net' started by enantiomer, Aug 22, 2006.

  1. enantiomer

    enantiomer Guest

    I am using my master page to always make sure that the User object is
    not null in Session. If it is null, I redirect them to the login page.
    Some of my child pages utilize the User object. I was assuming that
    the master page Page_Load would be called before ChildPage_Load
    methods, but it is the opposite. Is this normal?

    I need something to check that my User Session isn't null before the
    page loads. Any advise? Thanks,

    Jonathan
     
    enantiomer, Aug 22, 2006
    #1
    1. Advertising

  2. enantiomer

    Mark Rae Guest

    "enantiomer" <> wrote in message
    news:...

    >I am using my master page to always make sure that the User object is
    > not null in Session. If it is null, I redirect them to the login page.
    > Some of my child pages utilize the User object. I was assuming that
    > the master page Page_Load would be called before ChildPage_Load
    > methods, but it is the opposite.


    That's right.

    >Is this normal?


    Yes.

    > I need something to check that my User Session isn't null before the
    > page loads. Any advise? Thanks,


    Use the Page_Init event in your MasterPage
     
    Mark Rae, Aug 22, 2006
    #2
    1. Advertising

  3. enantiomer

    enantiomer Guest

    that worked.

    thanks,

    jonathan


    Mark Rae wrote:
    > "enantiomer" <> wrote in message
    > news:...
    >
    > >I am using my master page to always make sure that the User object is
    > > not null in Session. If it is null, I redirect them to the login page.
    > > Some of my child pages utilize the User object. I was assuming that
    > > the master page Page_Load would be called before ChildPage_Load
    > > methods, but it is the opposite.

    >
    > That's right.
    >
    > >Is this normal?

    >
    > Yes.
    >
    > > I need something to check that my User Session isn't null before the
    > > page loads. Any advise? Thanks,

    >
    > Use the Page_Init event in your MasterPage
     
    enantiomer, Aug 22, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Doug McCann
    Replies:
    1
    Views:
    1,079
    William Brogden
    Aug 5, 2004
  2. Luigi
    Replies:
    2
    Views:
    527
    Eliyahu Goldin
    May 22, 2006
  3. Jeff Rodriguez
    Replies:
    23
    Views:
    1,158
    David Schwartz
    Dec 9, 2003
  4. Zeba
    Replies:
    1
    Views:
    523
    Mark Rae
    Feb 22, 2007
  5. Luai24
    Replies:
    0
    Views:
    652
    Luai24
    May 6, 2009
Loading...

Share This Page