Click here to Skip to main content
15,887,596 members
Home / Discussions / C#
   

C#

 
GeneralRe: Session.clear ans session.abandon Pin
Pete O'Hanlon10-Sep-07 0:01
mvePete O'Hanlon10-Sep-07 0:01 
GeneralRe: Session.clear ans session.abandon Pin
Sonia Gupta10-Sep-07 0:04
Sonia Gupta10-Sep-07 0:04 
GeneralRe: Session.clear ans session.abandon Pin
Pete O'Hanlon10-Sep-07 0:28
mvePete O'Hanlon10-Sep-07 0:28 
GeneralRe: Session.clear ans session.abandon Pin
Virendrak10-Sep-07 1:34
Virendrak10-Sep-07 1:34 
GeneralRe: Session.clear ans session.abandon Pin
Pete O'Hanlon10-Sep-07 1:42
mvePete O'Hanlon10-Sep-07 1:42 
GeneralRe: Session.clear ans session.abandon Pin
Virendrak10-Sep-07 1:36
Virendrak10-Sep-07 1:36 
AnswerRe: Session.clear ans session.abandon Pin
Guffa10-Sep-07 11:02
Guffa10-Sep-07 11:02 
AnswerRe: Session.clear ans session.abandon Pin
Guffa9-Sep-07 23:39
Guffa9-Sep-07 23:39 
Sonia Gupta wrote:
i am using the following code
Session["Sonia"] = "11";
Session["Sonia1"] = "12";
Session.Clear();

it renders the Session["Sonia"] and session["Sonia1"] to null.


Actually, it removed the items. If it would just set the items to null, the Session.Count property would still return 2, but clearing the session items makes it return 0.

Sonia Gupta wrote:
Session["Sonia"] = "11";
Session["Sonia1"] = "12";
Session.Abandon();
leaves the session["Sonia"] AND Session["Sonia"] AS IT IS.


Yes. The current session can't be removed until the current request is completed. That would be sawing off the branch you are sitting on.

---
single minded; short sighted; long gone;

GeneralRe: Session.clear ans session.abandon Pin
Sonia Gupta9-Sep-07 23:42
Sonia Gupta9-Sep-07 23:42 
QuestionWrong compilation error message Pin
vikben9-Sep-07 22:12
vikben9-Sep-07 22:12 
AnswerRe: Wrong compilation error message Pin
Pete O'Hanlon9-Sep-07 22:50
mvePete O'Hanlon9-Sep-07 22:50 
GeneralRe: Wrong compilation error message Pin
vikben9-Sep-07 23:44
vikben9-Sep-07 23:44 
GeneralRe: Wrong compilation error message Pin
Pete O'Hanlon10-Sep-07 1:25
mvePete O'Hanlon10-Sep-07 1:25 
QuestionHelp with C# generated Excel documents Pin
dadart9-Sep-07 22:01
dadart9-Sep-07 22:01 
AnswerRe: Help with C# generated Excel documents Pin
Giorgi Dalakishvili9-Sep-07 22:17
mentorGiorgi Dalakishvili9-Sep-07 22:17 
QuestionNUnit tests issue [modified] Pin
Johan Lombaard9-Sep-07 21:53
Johan Lombaard9-Sep-07 21:53 
AnswerRe: NUnit tests issue Pin
Pete O'Hanlon9-Sep-07 22:44
mvePete O'Hanlon9-Sep-07 22:44 
GeneralRe: NUnit tests issue Pin
Johan Lombaard9-Sep-07 23:07
Johan Lombaard9-Sep-07 23:07 
GeneralRe: NUnit tests issue Pin
Pete O'Hanlon9-Sep-07 23:11
mvePete O'Hanlon9-Sep-07 23:11 
GeneralRe: NUnit tests issue Pin
Johan Lombaard10-Sep-07 0:56
Johan Lombaard10-Sep-07 0:56 
QuestionCant close serial port in windows form application Pin
bigbrownbeaver9-Sep-07 21:12
bigbrownbeaver9-Sep-07 21:12 
AnswerRe: Cant close serial port in windows form application Pin
c0ax_lx10-Sep-07 4:51
c0ax_lx10-Sep-07 4:51 
QuestionHow to set my own serial key Pin
Exelioindia9-Sep-07 20:59
Exelioindia9-Sep-07 20:59 
AnswerRe: How to set my own serial key Pin
Paul Conrad14-Sep-07 19:03
professionalPaul Conrad14-Sep-07 19:03 
QuestionI need DLL or Tools For Convert PDF to Image Pin
sakthi dasan9-Sep-07 20:42
sakthi dasan9-Sep-07 20:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.