Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
4
Reply
Check for Session in Asp.Net
Vishwas Kadamannaya
Dec 2 2013 5:13 AM
956
Reply
Hi All,
May be this is a silly Question, How to check These two conditions ,
1.The session is not expired but , the session variable is not assigned any value.
2. Session variable is assigned with value, but session is expired.
if(Session["mykey"] != null)
{
// Session is not expired
}
else
{
// Session is expired
}
Will this condition work for above two scenarios, or do i have to handle this both differently.
Please Help.
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
Using gridview event to display image in gridview in IMAGE
OPEN PDF FILE ON WEB PAGE AND SAVE AS PDF/A