auto Session check

  • Thread starter Thread starter rony_16
  • Start date Start date
R

rony_16

hi ,
i want to override the object session in class page , because i want to
check the Session["UserName"] automaticly in WebForm , without writing
"if" in evry page .

i know that i need to make a new class Lib and inharite from "page" .
but should i write in the fuction "public override HttpSessionState
Session" ???

Please Help me !!!
 
I typically create a class with nothing but properties
for section objects. Then, hide the Session[] stuff
in the get/set.

Everywhere else in the app, I get intellisense
for my session variables. Plus, it makes it
easy to avoid those types of null errors.
 
Back
Top