ASP Code
  Home arrow ASP Code arrow Page 4 - ASP Forms
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP CODE

ASP Forms
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 40
    2007-11-21

    Table of Contents:
  • ASP Forms
  • Cookies
  • A Baker's Dozen
  • Sessions
  • How to Store Sessions and Retrieve Them

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    ASP Forms - Sessions


    (Page 4 of 5 )

    A good way to visualize a session is to think of opening a program. That would start your session. Then you work in it and close it. That would be the end of your session. A Session Object stores data about a user session, and can change settings for that user session. When you begin a session in ASP, it creates a cookie with information about the user. The information is available to all pages within the application. Types of data stored are typically the user's name and any preferences they may have. The session object is destroyed after the session is over.

    Beginnings and Endings

    As I said, sessions have a beginning and an ending. Look at these two nifty bulleted lists that outline their time line:

    A session begins:

    • If the user requests an ASP file with a Global.asa file that contains a Session_OnStart procedure.
    • Whenever a value is stored in a Session variable.

    • When a user requests an ASP file with a Global.asa that contains the object tag that will "instantiate" a particular object with sessional scope.

    A session ends:

    • When the user has made no requests or has not refreshed a page within the application for a period that you specify. Note that this value is 20 minutes by default.

    Setting the Session Timeout

    You can change the amount of time before your session times out by using the Timeout property. Here is how that works:


    <%

    Session.Timeout=10

    %>

    More ASP Code Articles
    More By James Payne


       · how to data update,search,save in database through forms button
     

    ASP CODE ARTICLES

    - ASP Forms
    - ASP: The Beginning
    - Getting Remote Files With ASP Continued
    - Inbox and Outbox Manipulation in ASP
    - Relational DropDownList Using VB.NET
    - Ad Tracking URL Hits
    - Use ViewState to display one record per page...
    - Send Email using ASP.NET formatted in HTML
    - ASP File Explorer
    - ASP/XML Interview questions by Srivatsan Sri...
    - Various methods of setting Date values to a ...
    - Conditional DataGrid Item and using checkbox...
    - Fill .NET Listbox with SQL DataReader
    - Filling Dropdown box using Code-Behinds in C#
    - FLAMES code sample written in .NET What is F...

     
    Application Delivery: Everything You Wanted to Know, but Didn`t Know You Needed to Ask
    A comprehensive guide to examining the topics of Wide-area Data Services and app....

     
    Best Practices: Safe and Secure Hardware Asset Recovery
    Companies increasingly must meet EPA and local requirements for the disposal of ....

     
    Managing SSL Security in Multi-Server Environments
    Read this white paper to learn how to simplify management of your organization's....

     
    Open Source Security Myths
    Open Source Software (OSS) is computer software whose source code is available t....

     
    Power and Cooling Capacity Management for Data Centers
    This paper describes the principles for achieving power and cooling capacity man....

     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
    Stay green...Green IT