Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > master page needs to validate before child page

Reply
Thread Tools

master page needs to validate before child page

 
 
enantiomer
Guest
Posts: n/a
 
      08-22-2006
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

 
Reply With Quote
 
 
 
 
Mark Rae
Guest
Posts: n/a
 
      08-22-2006
"enantiomer" <> wrote in message
news: ups.com...

>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


 
Reply With Quote
 
 
 
 
enantiomer
Guest
Posts: n/a
 
      08-22-2006

that worked.

thanks,

jonathan


Mark Rae wrote:
> "enantiomer" <> wrote in message
> news: ups.com...
>
> >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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Timer on master page causes the child page to go through its page Luai24 ASP .Net 0 05-06-2009 12:52 PM
Can a master page be built from another master page Zeba ASP .Net 1 02-22-2007 10:55 AM
Master page code executed after child page code Luigi ASP .Net 2 05-22-2006 09:53 AM
seeking servlet "Master" keep getting "Master/servlet/Master" not found. Tomcat 5.0.25 Doug McCann Java 1 08-05-2004 09:16 PM
How do I: Main thread spawn child threads, which child processes...control those child processes? Jeff Rodriguez C Programming 23 12-09-2003 11:06 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57