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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Guest UserRank #1,422 · 1.2K reputationPosted Jul 27, 2011, 3:43 AM EDT
{
Response.Write("key = '" + key + "', value = '" + Session[key] + "'
");
}
Zoran HorvatRank #792 · 2.9K reputationPosted Jul 27, 2011, 3:16 AM EDT
x.Contains(x) makes no sense. I suppose you wanted to write Session.Contains(x).
Zoran
Smart LuckyRank #2,625 · 531 reputationPosted Jul 27, 2011, 3:52 AM EDT
Smart LuckyRank #2,625 · 531 reputationPosted Jul 27, 2011, 4:29 AM EDT
is it possible in this way i read this from following url.............?
http://www.w3schools.com/asp/coll_contents_sess.asp
Guest UserRank #1,422 · 1.2K reputationPosted Jul 27, 2011, 4:39 AM EDT
for (int i = 0; i < Session.Contents.Count; i++ )
{
Response.Write("key = '" + Session.Keys[i] + "', value = '" + Session[i] + "'
");
}
Smart LuckyRank #2,625 · 531 reputationPosted Aug 1, 2011, 8:42 PM EDT
Hi John Penn
Thanks for previous help
i how can i destory session in asp.net as in php(session_destory)....?
Guest UserRank #1,422 · 1.2K reputationPosted Aug 2, 2011, 5:02 AM EDT
Smart LuckyRank #2,625 · 531 reputationPosted Aug 2, 2011, 9:29 PM EDT
I have used this but still session is exist means showing the value and where session stores in window 7...?
Guest UserRank #1,422 · 1.2K reputationPosted Aug 3, 2011, 4:04 AM EDT
This post explains things much better.
Smart LuckyRank #2,625 · 531 reputationPosted Aug 3, 2011, 9:04 PM EDT