Tutorials covering strings variables and arrays. Learn to split strings, understand server variables master multi dimensional arrays. Get rid of the apostrophe bug in asp.
Passing info between pages is a simple task. We have all seen the long URLs that look like this: http:www.pacosdrivers.com/asp/name.asp?name=Paco This is done by passing data in a query string.
Like Session variables, Application variables are created in your Web server's memory and they persist across multiple pages. However, unlike Session variables, Application variables are not tied to a particular user. Once created, an Application variable remains in memory until it is explicitly removed or your Web server crashes
So why should every visitor to the site have to cause an identical database query? The simple answer is to take advantage of Application variables. Think of the "Application" in this case being IIS - the server. Once set, Application variables are available to all pages on your site. But it's important to remember that they are gone forever if the server is restarted.
Most variables that you deal with contain one value. Sometimes however it's useful to store more than one value. Arrays are one way to do this. Since I can't come up with a good simple definition I'll turn to Microsoft's definition from the VBScript documentation
An array is a special type of variable that can be used to represent a list of related values or a table of related values. For example, imagine that your Web site has a shopping cart. You can represent the items in the shopping cart by using an array like this:
What if you want to declare numerous values to a single variable . This is when we use an array . To declare an array we use the same syntax as a normal variable declaration but add ( ) on the end
This example checks too see if a number is in a valid range , it rejects numbers too high or low and non numerical entries .Handy if you want to ensure for some reason a user enters a number in a valid range , say for their age
Sick off trying to workout where to put "s(i.e. quote marks) in your ASP code, without getting an error , below for an example. Say you want to print out a html page from your ASP and you need to write a FONT tag to the page you could type out-