Web Hosting Offers
See the new scripts recently added to Dynamic Drive. Click here.
Original, practical CSS codes and examples such as CSS menus for your site.
    Search code samples  
 
  Keyword
 
 
 
   
 
 
  Code Samples
 
ASP
CSS
Dhtml
Html
Javascript
PHP
 
   
     LOGIN HERE  
 
Username
Password
Forgot Password
Verify Signup
 
 
 

ASP >> Objects

Can I disable the use of session variables on an ASP page-by-page basis?

Visitor Ratings (0) :

Description
here are times when you may wish to turn off the use of session variables for a certain set of ASP Web pages. For example, let's say that you have a website of 50 ASP pages, and four of these pages use Session variables. No matter what page you load, IIS has to prepare for the chance that that particular page might use Session variables; this preparation is called "Session tracking." According to the IIS Documentation, "Session tracking maintains information about a set of requests that are issued by a single client." This maintenance, of course, comes at a performance cost. Why, though, should this performance hit affect all of your ASP pages, even the ones that don't use Session variables?

It doesn't have to. You can explicitly tell IIS that you aren't using any Session variables for a particular ASP page. All you need to do is add this single line of code at the top of your ASP page:

<%@ ENABLESESSIONSTATE=False %>

By adding this line of code, you are informing IIS that it need not worry about Session tracking for the ASP page.
Code
Select All
 Rate this Resource