Closed Thread Icon

Topic awaiting preservation: .NET Page Inheritance (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=21476" title="Pages that link to Topic awaiting preservation: .NET Page Inheritance (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: .NET Page Inheritance <span class="small">(Page 1 of 1)</span>\

 
Rhino
Bipolar (III) Inmate

From: New Jersey, USA
Insane since: Jul 2003

posted posted 04-21-2004 16:35

I am currently working on a project in .NET and want to do Session checking in each page. I am creating a base page which all other pages will inherit from. What I would like to do is override the Page_Load method to handle the Session checking, but am not sure if this is the best route to go.

Has anyone here done anything like this, or have any tips, pointers or directions for me to follow. All help is appreciated.

Regards,

Rhino

norm
Paranoid (IV) Inmate

From: [s]underwater[/s] under-snow in Juneau
Insane since: Sep 2002

posted posted 04-21-2004 21:12

if you set your variable on one page:

// Set the Session value.
Session[txtName.Text] = txtValue.Text;


you should be able to access it on any other page by referring to:

Session[txtName.Text]

you can use this with a conditional statement or print it or whatever...... using the onLoad method for any class.

/* Sure, go ahead and code in your fancy IDE. Just remember: it's all fun and games until someone puts an $i out */

« BackwardsOnwards »

Show Forum Drop Down Menu