hi david,
well a session will always be alive , each time a request is send to the
server a new session is created if needed, the only place where you can know
that a session is gone is in the session_end handler.
what yoiu can do is check if a session is new or old, or if the session
passed certain milestone, you know if it's a new session in the
session_start handler.
You can always chgeck for "milestones" or states checking variables in
session as you do ni your first variant.
cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"David" <da*********@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Hi, I write asp.net via c#.
How should I know the client's session alive?
1. if ( Session["uid"].Equals ( null ) )
2. if ( Convert.IsDBNull(Session["uid"]) )
3. if ( Session.Contents.Count == 0 )
Thanks for your kind advice, David.