470,647 Members | 1,159 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,647 developers. It's quick & easy.

auto Session check

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 !!!

Dec 7 '05 #1
3 1181
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.

--
Robbe Morris - 2004/2005 Microsoft MVP C#
http://robbemorris.blogspot.com

<ro*****@017.net.il> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
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 !!!

Dec 7 '05 #2
Do you have an example code?

Dec 9 '05 #3
Do you Have an example code?

Dec 9 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by janet | last post: by
9 posts views Thread by William LaMartin | last post: by
6 posts views Thread by Gonenc Ercan | last post: by
6 posts views Thread by kurt | last post: by
3 posts views Thread by rony_16 | last post: by
10 posts views Thread by Li Pang | last post: by
reply views Thread by thecoolone | last post: by
14 posts views Thread by aroraamit81 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.