Print Design Templates Take a look at these creative Graphic Design templates for brochures, flyers, newsletters, stationery, postcards, ads, menus and posters for a variety of businesses.
Invoicing 4 Freelancers A complete, secure, online billing application that maintains hourly service billing, flat fee billing and recurring charges. Integration with Authorize.Net and other leading payment gateways provides hands-free recurring billing with a sophisticated CRM system.
Free Design Magazines Browse through our extensive list of free Graphic Design, Web Design, Business, Computer, and Computer Graphics magazines, white papers, downloads and podcasts to find the titles that best match your skills and interests; topics include management, marketing, operations, sales, and technology. Simply complete the application form and submit it. All are absolutely free to freelance professionals who qualify.
Suggested Links Photoshop Tutorials
Logo Designer's Logos
Web Design Tools List
Layouts & Templates Directory
Web Design & Graphic Design Blog
Photoshop, Flash, 3D Studio Max Tutorials
Web Designers & Developers
Crafts for Kids
Photoshop Tutorial Man
Tutorial Guide -- Free Webmaster Tutorials
Design Contests
How to Draw
Work From Home Job Search
OTHER SITES WE OWN
AllFreelance
Graphic Design Resources Directory
Graphics Tutorials Directory
Social Networking Articles
Design Sites Up
All Freelance Work & Portfolios
Graphic Design Community
Education & Learning Directory
![]() |
home > Web Design Tutorials > Programming Tutorials > ASP Coding Tutorials > ASP Variables and Forms Tutorials
Planet Source Code - VarsFromForm - This subroutine creates a variable for each form item found on Request.Forms or Request.QueryString collections. The variable is given the same name as the form items name.
ASP 101 - Functions for Passing Variable - you're coming here directly and haven't read A Pair of Functions for Multi-Page Forms, you should do so now so you know what you're getting into. What follows is a set of extremely helpful code that should make your life a lot easier.
Variable Types Sample
This is a variable types sample article. Just when you though all variables were the same and you had finally figured the variant out--they pull you back in with variant sub-types.
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
||
Variable Name Prefixes- Good ASP code is easy to read and understand. A quick way to make your code self-documenting is to name your variables in a meaningful way. The IIS Resource Kit team has put together a list of variable name prefixes to be used with assorted data types. Using them will not only make your code easy to read, but it will also have a professional feel.
Scope out your variables
In ASP, script- or page-level variables are available across all of the code on any page for the lifetime of that page. These variables are declared outside the scope of any particular procedure or function. Procedure-level variables, on the other hand, are declared within a function or procedure and are available only within the scope of that function. That means you can access the value in the variable only within the context of its function or procedure. The code below demonstrates how to declare both script- and procedure-level variables:
Dim Even When Not Using Option Explicit- If for any reason you ever find yourself not using Option Explicit (IE: maintaining someone else's old code), you should still dimension all the variables you use. A dimensioned variable works almost twice as fast as an implicitly created variable.
Planet Source Code - VarsFromForm- This code formats the values returned by the Request object. It is not meant to replace validation in your forms but assist in converting balnk strings, null values, etc. to the proper data type for saving.
Planet Source Code - Dynamically Generate Variables- The purpose of this application is to make it easier to capture data from forms. I decided to write a way to dynamically create the request which strip the variable for apostrophes and also trims the variable
Planet Source Code - Hex Viewer - Allows you to view the binary data of any file (GIF, JPG, ZIP, TXT, HTM, ASP) as if you were looking at a common hex viewer. Bytes are displayed as Hex characters and character data is displayed on the right.
Codefixer - Variables in ASP (VBScript)- A variable acts as a container holding or storing a value in the server computer's memory. We can then use or change the value of the variable throughout our code. Thus we could create a variable myFavouriteTeam that holds my favourite football team namely 'Spurs' and print out the value of the variable on our page. Note that to declare a variable in ASP/VBScript we use the Dim statement.
The basics of variables in ASP- Variables are vital in most every ASP script. Lets start out with the syntax for declaring a variable within a script.
Server variables- The available Server Variables vary based on the result of a combination of the browser software and the server software. They are not always exactly the same on your server and with specific browsers as documented here. There is an easy way to obtain a list. If the script is executed on a given browser, the Server Variables displayed will reflect that browser plus your server.
Code Snippet - List all session variables- This script lists all of the session variables and what the value of each session variable is in real time on your domain.
Fun with Application Variables- The following tutorial will show a simple method for setting and using Application Variables. These variables are a life saver when it comes to writing long drawn out applications that require alot of the same recordset results.
View All Variables- This single ASP page will list down all site variables. It will list down Server variables, Application variables, session variables, cookies and ASP/IIS Engine details. Very helpful for debugging.
How to get server variables- Server variables are environment variables that tell you about the environment that your application is running in. True you can find all kinds of information in the server variables.
W3Schools - ASP Variables
If the variable is declared outside a procedure it can be changed by any script in the ASP file. If the variable is declared inside a procedure, it is created and destroyed every time the procedure is executed.
Client Variable To Server- Need to get a variable from client to server? this first visit to the page has an empty string for tPass variable, after the user clicks the submit button the page re-loads itself but this time, with tPass holding a value the user enters
Server Variables Sample
The server variables ("ServerVariables") collection can be very helpful when you are developing ASP applications. As you have probably noticed in some of the other sample applications on this site, you can use the server variables collection to determine the client's browser, IP address, the current page they are viewing, the page which referred them to the current page, and many other details. The sample application(code below) listed here is a very simple app which lists all of the server variables and their current values. Note that this information varies depending on what server you are using. IIS4 has many additional variables not included in IIS3. The proper syntax to refer to a server variable in your code is Request.ServerVariables("VariableName").
RECENT ARTICLES from Graphic Design BloG
[CaRP] Can't open cache file.
Business Cards: Ideas and Inspiration, Part II
Today we continue looking at business cards that stand out, and here’s hoping you get some inspiration and ideas! After all, you only get one first impression, so your business card should be something that showcases the best of your design abilities. On Wednesday we looked at the use of interesting shapes, 3D business cards, [...]
![]() |
![]() |
|
![]() |
![]() |
|
[CaRP] Can't open cache file.
Making the Move from Freelance Work to Full-Time Employment
If you are like me, after graduating from a graphic design school, your goal was to make it as a freelance web designer. The lure of flexible hours, working from home and the freedom to manage your own time was too much to resist. At some point, I decided it may be ?easier? to work [...]
Tips for Asking for a Raise
At some point in our careers, there is a time when we open our paychecks and breathe a sigh of disappointment. After years of studying at a graphic design school and countless hours spent devoted to learning from colleagues and researching new design techniques, the numbers on our pay stub just don?t seem to measure [...]
Stock vs. Original Digital Photography
A picture is worth a thousand words. Graphic design schools teach us that photos on web sites have the potential to capture our attention, motivate us to read more or even propel us to navigate to another web site entirely. They inflict emotion and can establish a connection between site visitors and the goods or [...]
3 Tips to Manage Content Updates
While walking through the pharmacy I passed the aisle filled with red heart-shaped boxes filled with chocolates and remembered Valentine?s Day is quickly approaching. Even though I was surrounded by so many representations of love, it reminded me of one thing that I actually despise ? web content updates! Graphic design schools teach many, many [...]
Should You Drop the Drop-Down Menus?
I was recently on a home improvement web site searching for ideas for renovating my bathroom. After a few minutes on the site I realized that I was not going to find what I was looking for ? it certainly could have been there, but I just could not find it. Menu after menu had me [...]
Sharpen Your Skills and Gain an Edge at 2011 Web Design Conferences
Graphic design schools prepare us well for our immediate future, but it takes effort to stay on top of the ever-changing field of web design. Following are a few of the upcoming conferences and trade shows meant to help you stay a step ahead of the competition.
Interaction Eleven In its fourth year, Interaction Eleven is [...]
All Web Design Resources is a Directory & Blog Full of Tools for Web Site Designers
All Web Design Resources Portal is a Web Site Design education directory with resources & articles for Graphic Designers, Web Developers, & Web Designers including a Web Design forum, blog, graphics software tips, web development resources, web programming tools, web design jobs, advice for new web designers about web design schools and education as
well as tips for freelance web design business owners, and much more.