ASP Code
  Home arrow ASP Code arrow Page 2 - ASP: The Beginning
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: The Beginning
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 22
    2007-11-20

    Table of Contents:
  • ASP: The Beginning
  • Variables
  • Working with Variables
  • Naming Conventions

  • 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: The Beginning - Variables


    (Page 2 of 4 )

    The easiest way to think of a variable is with your brain. The second easiest way is to think of them as a box that contains a piece of data. You can take the data out and replace it with another piece of information, or you can leave it empty and store something in it later (or never), or if you are obsessive compulsive you can take things out and put them back in over and over again. Or if you are poor like me you can use the box as a chair. Get a tall enough dog to stand behind you and you've got yourself a recliner.

    Unlike a box, variables also have a lifetime. I know, it's sad, but we all have to cross over that dark divide. The lifetime (or scope) of a variable depends upon where you declare it. If you declare the variable outside of a procedure (we will discuss these later on), then the variable lives as long as the file does, and can be called by any script in the ASP file. If you declare the variable inside of a procedure however, it is destroyed every time the procedure is executed, and cannot be accessed by any other script in the file.

    If you wish to create variables that are available to every page on your website (and not just the ASP file in which you created them), you can either use a session variable or an application variable.

    Session variables store information about a single user. They can be used by any page on your website and typically store data such as the user's name, browser type, and any preferences they may have.

    Application variables store data about every user relevant to the application and are available to every page on your site.

    More ASP Code Articles
    More By James Payne


       · Thanks for stopping by. In this article we discuss the basics of ASP and how to...
       · ASP? - not ASP.NET, but classic ASP? This *must* be a repost of some article...
       · Believe it or not, its a bonafide ASP without the .Net article. Aimed mostly at the...
     

    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 1 hosted by Hostway
    Stay green...Green IT