I am trying to get sessoin values in this way but it is not wording properly can any one help me...?
foreach ( x in Session.Contents)
{
Response.Write(x + "====" +x.Contains(x));
}
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Guest UserPosted Jul 27, 2011, 7:43 AM
{
Response.Write("key = '" + key + "', value = '" + Session[key] + "'
");
}
Smart LuckyPosted Aug 4, 2011, 1:04 AM
Guest UserPosted Aug 3, 2011, 8:04 AM
This post explains things much better.
Smart LuckyPosted Aug 3, 2011, 1:29 AM
I have used this but still session is exist means showing the value and where session stores in window 7...?
Guest UserPosted Aug 2, 2011, 9:02 AM
Smart LuckyPosted Aug 2, 2011, 12:42 AM
Hi John Penn
Thanks for previous help
i how can i destory session in asp.net as in php(session_destory)....?
Guest UserPosted Jul 27, 2011, 8:39 AM
for (int i = 0; i < Session.Contents.Count; i++ )
{
Response.Write("key = '" + Session.Keys[i] + "', value = '" + Session[i] + "'
");
}
Smart LuckyPosted Jul 27, 2011, 8:29 AM
is it possible in this way i read this from following url.............?
http://www.w3schools.com/asp/coll_contents_sess.asp
Smart LuckyPosted Jul 27, 2011, 7:52 AM
Zoran HorvatPosted Jul 27, 2011, 7:16 AM
x.Contains(x) makes no sense. I suppose you wanted to write Session.Contains(x).
Zoran