I'm have a shopping cart where the customer loggs in, which initiates the session.sessionid which once their done ordering is their order number. Once they hit submit to confirm their order I want to abandon the session.sessionID and redirect them to the default page.<BR><BR>session_id = session.sessionid<BR>session.contents.remove session_id<BR>response.redirect "default3.asp"
..Akhilesh, please confirm.<BR><BR>Session.SessionID is not something you can modify, it is the unique ID for the cookie on the client machine.<BR><BR>But...you can delete the whole session (Session.Abandon) and then redirect to a page.<BR><BR>or if you insist, you can create a Session var with the SessionID in it then use that session var but that would be a bit of an overhead.<BR><BR>Eniac
I have a similar situation. I want to "empty" a session variable on the same page after a insert statement happens. <BR><BR>Not the sessionid one though, a variable that I have assigned. Is there a way to do this?
Contents.Remove<BR>The Remove method deletes a specific item from the Session object's Contents collection.<BR><BR>Syntax<BR>Session.Contents.Remo ve( Item|Index )<BR><BR> <BR><BR>Parameter<BR>Item <BR>The name of the member to remove from the collection.<BR><BR>Index <BR>The index entry for the member to remove from the collection. <BR>Remarks<BR>The Contents.Remove method takes either a string or an integer as an input parameter. If the input parameter is a string, the method will search the contents collection for an item with that name and remove it. If the input parameter is an integer, the method counts that number of items from the start of the collection, and removes the corresponding item.<BR><BR>Example<BR>The following example adds and removes a variable called myName to the Session.Contents collection.<BR><BR><% <BR> Session("myName") = " "<BR> Session.Contents.Remove("myName")<BR>%><BR><B R>[Thank you MSDN] - Not that I did not know but I didn't have to type it all :)