IT Community - Software Programming, Web Development and Technical Support

How to clear Session

This is a discussion on How to clear Session within the C# Programming forums, part of the Software Development category; Hey, am trying to delete the previous session using the 'Session.Abandon' method to remove the browser and server cache ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > C# Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 09-06-2007, 01:00 AM
SaravananJ SaravananJ is offline
D-Web Programmer
 
Join Date: Aug 2007
Posts: 79
SaravananJ is on a distinguished road
Question How to clear Session

Hey,

am trying to delete the previous session using the 'Session.Abandon' method to remove the browser and server cache to delete the cached contents. but it didn't worked for me..

please let me know, if anybody faced this issue earlier...

Thanks in advance
__________________
J.Saravanan
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-07-2007, 12:21 AM
Sathish Kumar Sathish Kumar is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 304
Sathish Kumar is on a distinguished road
Thumbs up Re: How to clear Session

Hi saravanan,
Its very easy to clear the session. Here is the code to clear the session
Session.Clear() ; //thats it.Your session is cleared.


Cheers
__________________
Sathish Kumar.R
Knowledge is meant to SHARE
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-09-2007, 11:32 PM
KiruthikaSambandam KiruthikaSambandam is offline
D-Web Analyst
 
Join Date: Aug 2007
Posts: 332
KiruthikaSambandam is on a distinguished road
Default Re: How to clear Session

Hi

The major difference is that if you call Session.Abandon(), Session_End will be fired (for InProc mode), and in the next request, Session_Start will be fired.

Session.Clear( ) just clears the session

So use Session.Clear( ).

thx
Kiruthika
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 09-11-2007, 03:32 AM
gplogesh gplogesh is offline
D-Web Trainee
 
Join Date: Aug 2007
Posts: 4
gplogesh is on a distinguished road
Default Re: How to clear Session

Hi,

Try this one...
Responce.buffer=true;

and let me know the feed back...

Thanks.
__________________
GP. Logesh...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 09-12-2007, 02:38 AM
SaravananJ SaravananJ is offline
D-Web Programmer
 
Join Date: Aug 2007
Posts: 79
SaravananJ is on a distinguished road
Default Re: How to clear Session

Hi Friends,

FYI: am using SQL caching in my site, i used Session.Abandon(),Session.Clear() and Session.Remove() all together, but nothing worked for me... but sometimes it founds to be working fine... its we are confusing why happened like this....

Thanks
__________________
J.Saravanan
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
clear screen the command mode? saravanan Java Programming 2 03-21-2008 05:42 AM
How to clear HTTP Cache Content? senraj PHP Programming 3 11-01-2007 07:47 AM
How to clear all the textboxes in my form in ASP DOT NET and C#? a.deeban ASP and ASP.NET Programming 3 09-20-2007 07:23 AM
Destroy session using session ID Jeyaseelansarc PHP Programming 1 09-07-2007 07:42 AM
how to clear the http cookies in asp.net GDevakii ASP and ASP.NET Programming 2 08-09-2007 07:29 AM


All times are GMT -7. The time now is 01:40 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0