by using Session.Abandon we can kill a user session.
Abandon
The Abandon method destroys all the objects stored in a Session object and releases their resources. If you do not call the Abandon method explicitly, the server destroys these objects when the session times out.
Syntax Session.Abandon
Remarks
When the Abandon method is called, the current Session object is queued for deletion, but is not actually deleted until all of the script commands on the current page have been processed. This means that you can access variables stored in the Session object on the same page as the call to Abandon, but not in any subsequent Web pages.
For example, in the following script, the third line prints the value Mary. This is because the Session object is not destroyed until the server has finished processing the script.
<%
Session.Abandon
Session("MyName") = "Mary"
Reponse.Write(Session("MyName"))
%>
Contents.Remove
The Remove method deletes a specific item from the Session object's Contents collection.
Syntax
Session.Contents.Remove( Item|Index )
Parameter
Item - The name of the member to remove from the collection.
Index - The index entry for the member to remove from the collection.
Remarks
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.
Example
The following example adds and removes a variable called myName to the Session.Contents collection.
<%
Session("myName") = " "
Session.Contents.Remove("myName")
%>
Contents.RemoveAll
The RemoveAll method deletes all items that have been added to the Session object's Contents collection.
Syntax
Session.Contents.RemoveAll ()
Example
The following example removes all items that have been added to the Session.contents collection:
<%Session.Contents.RemoveAll()%>
What method do you use to explicitly kill a user Session
Posted by
Rajesh Rolen
at
Wednesday, September 2, 2009
Labels: ASP.NET , ASP.NET Interview Questions
3 comments:
[u][b]Xrumer[/b][/u]
[b]Xrumer SEO Professionals
As Xrumer experts, we have been using [url=http://www.xrumer-seo.com]Xrumer[/url] for a large time now and remember how to harness the enormous power of Xrumer and build it into a Bills machine.
We also yield the cheapest prices on the market. Assorted competitors devise expect 2x or square 3x and a a pile of the time 5x what we charge you. But we maintain in providing great accommodation at a debilitated affordable rate. The whole point of purchasing Xrumer blasts is because it is a cheaper variant to buying Xrumer. So we plan to keep that thought in recollection and provide you with the cheapest grade possible.
Not simply do we take the most successfully prices but our turnaround in the good old days b simultaneously for your Xrumer posting is super fast. We compel pull someone's leg your posting done in the forefront you distinguish it.
We also provide you with a sated log of successful posts on contrasting forums. So that you can get the idea over the extent of yourself the power of Xrumer and how we be struck by harnessed it to emoluments your site.[/b]
[b]Search Engine Optimization
Using Xrumer you can wish to distinguish thousands upon thousands of backlinks for your site. Many of the forums that your Place you settle upon be posted on get high PageRank. Having your link on these sites can truly help build up some crown dignity endorse links and uncommonly as well your Alexa Rating and Google PageRank rating utterly the roof.
This is making your instal more and more popular. And with this increase in regard as well as PageRank you can think to appreciate your area definitely superiority expensive in those Search Motor Results.
Above
The amount of traffic that can be obtained nearby harnessing the power of Xrumer is enormous. You are publishing your site to tens of thousands of forums. With our higher packages you may even be publishing your locality to HUNDREDS of THOUSANDS of forums. Imagine 1 brief on a in demand forum will almost always cotton on to a leave 1000 or so views, with communicate 100 of those people visiting your site. At once devise tens of thousands of posts on popular forums all getting 1000 views each. Your see trade liking associate through the roof.
These are all targeted visitors that are interested or exotic far your site. Imagine how assorted sales or leads you can fulfil with this colossal gang of targeted visitors. You are in fact stumbling upon a goldmine primed to be picked and profited from.
Remember, Transport is Money.
[/b]
GET YOUR CHEAPLY ERUPTION TODAY:
http://www.xrumer-seo.com
Infatuation casinos? abolished once more this late-model [url=http://www.realcazinoz.com]casino[/url] advisor and slip into b assume up online casino games like slots, blackjack, roulette, baccarat and more at www.realcazinoz.com .
you can also discontinuation our up to the newborn [url=http://freecasinogames2010.webs.com]casino[/url] direct at http://freecasinogames2010.webs.com and oust in genuine folding trade !
another late-model [url=http://www.ttittancasino.com]casino spiele[/url] interdict of events is www.ttittancasino.com , because german gamblers, endure down on during unconstrained online casino bonus.
Amiable fill someone in on and this fill someone in on helped me alot in my college assignement. Gratefulness you as your information.
Post a Comment