IT SOLUTIONS
Your full service technology partner! 
+Expand
   ► KBWebsite Scri...ASP Classic   Print This     

ASP Classic KB: ASP Classic Topic

History: Active Server Pages (ASP) is Microsoft's first server-side scripting language. It is intended to help build dynamic websites and is not a general development language. It is not a suitable tool for building desktop applications, DLLs, help files, etc. It is suitable for building very fast dynamic websites. It typically executes on the server and delivers HTML combined with browser-side JavaScript back to a user's browser.

Topics

90 Articles Found in the ASP Classic Topic  (or one of the sub-topics in bold above)

  KB Article    

Mike Prestwood
1. 4 Guys from Rolla http://www.4guysfromrolla.com/
17 years ago
(1 Comments , last by Lonnie.T )

Link
Nothing New Since Your Last Visit
6835
Hits

ASP Classic Coding

Mike Prestwood
2. A 10 Minute ASP Classic Quick Start

An example of using ASP's Response.Write and creating functions.

Posted to KB Topic: Tool Basics
23 years ago
(4 Comments , last by Kate.N )

Article
Nothing New Since Your Last Visit
22173
Hits

ASP Classic Coding

Kim Berry
3. ADO Objects must be explicitly closed Setting ADO objects to Nothing without first closing them might cause ASPMail to fail
23 years ago
(1 Comments , last by Albert.C2 )

KB Post
Nothing New Since Your Last Visit
6832
Hits

ASP Classic Coding

Mike Prestwood
4. ASP and ADO Coding Practices ASP and ADO coding best practices.
22 years ago
(1 Comments , last by Albert.C2 )

KB Post
Nothing New Since Your Last Visit
10256
Hits

ASP Classic Coding

Mike Prestwood
5. ASP Application.Lock Method

Call Application.Lock to freeze ASP code while you set IIS application variables the Application.Unlock to unfreeze. No actions take place on the server while locked. 

Application.Lock

Application(YourAppVar) = AValue
Application.Unlock
 
Posted to KB Topic: Language Details
19 years ago, and updated 16 years ago
(2 Comments , last by Uwais.Q )

Tip
Nothing New Since Your Last Visit
18457
Hits

ASP Classic Coding

Mike Prestwood
6. ASP Classic Array (x = Array())

Arrays in ASP Classic use a 0-based indice.

Use UBound to get the number of elements. UBound returns -1 if the array has no elements, 0 if it has 1, 1 if it has 2, etc.

15 years ago, and updated 14 years ago
(2 Comments , last by Jeorge.W )

Code

KB Post
Nothing New Since Your Last Visit  
18096
Hits

ASP Classic Coding

Mike Prestwood
7. ASP Classic Assignment (=)

ASP Classic uses = for it's assignment operator.

Posted to KB Topic: Tool Basics
17 years ago, and updated 17 years ago
(1 Comments , last by Helenn.m )

Code
Nothing New Since Your Last Visit
8113
Hits

ASP Classic Coding

Mike Prestwood
8. ASP Classic Associative Array (Scripting.Dictionary)

Use the scriptiing dictionary object which is available on later versions of ASP Classic (all still commonly in use). Both Access VBA and VB Classic use a collection for this but collections are not supported in ASP Classic.

Dim StateList
Set StateList = Server.CreateObject("Scripting.Dictionary")
StateList.Add "CA", "California"
StateList.Add "NV", "Nevada"
Response.Write "I live in " & StateList.Item("CA")
Posted to KB Topic: Language Details
17 years ago, and updated 16 years ago
(2 Comments , last by roman.d )

Code

KB Post
Nothing New Since Your Last Visit
51771
Hits

ASP Classic Coding

Mike Prestwood
9. ASP Classic Case Sensitivity (No)

ASP Classic is not case sensitive. My preference for all languages where case sensitivity does not matter is to use camel caps as in the first example above. Many developers coming from a case sensitive language prefer to use all lowercase.

17 years ago, and updated 16 years ago
(4 Comments , last by WilliamE.G.W )

Code
Nothing New Since Your Last Visit  
20046
Hits

ASP Classic Coding

Mike Prestwood
10. ASP Classic Class..Object (Class..Set..New)

Ultra-primitive (no inheritance) but useful and encourages you to think and design using objects.

Posted to KB Topic: OOP
17 years ago, and updated 16 years ago
(2 Comments , last by Ganes.J )

Code

KB Post
Nothing New Since Your Last Visit
18401
Hits

ASP Classic Coding

Mike Prestwood
11. ASP Classic Code Blocks (End Xxx)

In .ASPhtml pages, you embed ASP code between <% and %>.

ASP Classic code blocks are surrounded by statement ending keywords that all use End such as End Sub, End If, and WEnd.

Posted to KB Topic: Tool Basics
17 years ago, and updated 16 years ago
(2 Comments , last by coca.m )

Code
Nothing New Since Your Last Visit
9209
Hits

ASP Classic Coding

Mike Prestwood
12. ASP Classic Comments (' or REM)

Commenting Code
ASP Classic, like all the VB-based languages, uses a single quote (') or the original class-style basic "REM" (most developers just use a quote). ASP Classic does NOT have a multiple line comment.

Preprocessor Directives - @ and #
An @ is used for preprocessor directives within ASP code (within <% %>) and a # is used for HTML-style preprocessor directives.

Note: ASP Classic does not support VB Classic's #If directive.

Posted to KB Topic: Tool Basics
17 years ago, and updated 16 years ago
(35 Comments , last by rimav.o )

Code
Nothing New Since Your Last Visit
36941
Hits

ASP Classic Coding

Mike Prestwood
13. ASP Classic Comparison Operators (=, <>)

Save as VB Classic.

Posted to KB Topic: Tool Basics
17 years ago, and updated 16 years ago
(7 Comments , last by coca.m )

Code

KB Post
Nothing New Since Your Last Visit
29473
Hits

ASP Classic Coding

Mike Prestwood
14. ASP Classic Constants (Const kPI = 3.1459)

Scope can be Public or Private. Public Const is the same as just specifying Const. As with variables, all constants are variants. You do not specify the type, it's implied.

Posted to KB Topic: Language Basics
17 years ago, and updated 16 years ago

Code
Nothing New Since Your Last Visit
11224
Hits

ASP Classic Coding

Mike Prestwood
15. ASP Classic Constructors (Class_Initialize)

When an object instance is created from a class, ASP calls a special parameter-less sub named Class_Initialize. Since you cannot specify parameters for this sub, you also cannot overload it.

When a class is destroyed, ASP calls a special sub called Class_Terminate.

Posted to KB Topic: OOP
16 years ago, and updated 16 years ago
(7 Comments , last by Russell.A )

Code

KB Post
Nothing New Since Your Last Visit  
37236
Hits

ASP Classic Coding

Mike Prestwood
16. ASP Classic Custom Routines (Sub, Function)

ASP Classic is a non-OOP language with some OOP features. It offers both Subs and Functions. A Sub does not return a value while a Function does. When Subs and Functions are used in a defined class, they become the methods of the class.

Posted to KB Topic: Language Details
17 years ago, and updated 17 years ago

Code
Nothing New Since Your Last Visit
19477
Hits

ASP Classic Coding

Mike Prestwood
17. ASP Classic Deployment Overview

With ASP Classic, you simply copy your files to a web server that is capable of running ASP pages. This includes your .ASP pages along with supporting files such as images, include files, and database files.

Optionally, you can also deploy a global.asa file which is used to code certain events like application start, application end, session start, and session end.

Posted to KB Topic: Tool Basics
16 years ago
(21 Comments , last by Emma.k )

Code
Nothing New Since Your Last Visit
9423
Hits

ASP Classic Coding

Mike Prestwood
18. ASP Classic Destructor (Class_Terminate)

When an object instance is destroyed, ASP calls a special parameter-less sub named Class_Terminate. For example, when the variable falls out of scope. Since you cannot specify parameters for this sub, you also cannot overload it.

When an object instance is created from a class, ASP calls a special sub called Class_Initialize.

Posted to KB Topic: OOP
16 years ago, and updated 16 years ago
(1 Comments , last by Anonymous )

Code

KB Post
Nothing New Since Your Last Visit  
24565
Hits

ASP Classic Coding

Mike Prestwood
19. ASP Classic Development Tools

Languages Focus: Development Tools

Primary development tool(s) used to develop and debug code.

ASP Classic Development Tools

Microsoft Visual Interdev was popular for several  years but isn't used as much any more. Any good editor such as Microsoft Expression Web, etc. will work but debugging is left up to interactive skills.

Posted to KB Topic: Tool Basics
17 years ago, and updated 16 years ago
(5 Comments , last by Mike.A4 )

Code
Nothing New Since Your Last Visit
9141
Hits

ASP Classic Coding

Mike Prestwood
20. ASP Classic Edit Record (AddNew, Update, Delete)

In ASP, using ADO, you use RecordSet.AddNew to add a new record, Recordset.Update to post the record, and RecordSet.Delete to delete it. To edit a record, you open the RecordSet using an editable cursor.

15 years ago

Code
Nothing New Since Your Last Visit
20691
Hits

ASP Classic Coding

Mike Prestwood
21. ASP Classic Empty String Check (Len(s&vbNullString))

In ASP Classic, you have to add an empty string to the value being compared in order to get consistent results. For example, add &"" to your string varilable or it's code equivalent &vbNullString. Then compare to an empty string or verify it's length to 0 with Len.

16 years ago, and updated 15 years ago
(4 Comments , last by Eugene.P )

Code

Article
Nothing New Since Your Last Visit  
49091
Hits

ASP Classic Coding

Mike Prestwood
22. ASP Classic End of Statement (Return)

Languages Focus: End of Statement

In coding languages, common End of statement specifiers include a semicolon and return (others exist too). Also of concern when studying a language is can you put two statements on a single code line and can you break a single statement into two or more code lines.

ASP Classic End of Statement

A return marks the end of a statement and you cannot combine statements on a single line of code. You can break a single statement into two or more code lines by using a space and underscore " _".

Posted to KB Topic: Tool Basics
17 years ago, and updated 16 years ago
(2 Comments , last by Willie.T )

Code
Nothing New Since Your Last Visit
9156
Hits

ASP Classic Coding

Mike Prestwood
23. ASP Classic error 0208 : 80004005 (Generic request collection) error 'ASP 0208 : 80004005' Cannot use generic Request collection /_private/footer_content.inc, line 72 Cannot use the generic Request collection after calling BinaryRead.
18 years ago, and updated 18 years ago
(4 Comments , last by Dana.M )

Error
Nothing New Since Your Last Visit
21154
Hits

ASP Classic Coding

Mike Prestwood
24. ASP Classic Error 3709

Run-time error '3709':
Operation is not allowed on an object referencing a closed or invalid connection.

Posted to KB Topic: Language Details
15 years ago
(3 Comments , last by petter.s )

Error
Nothing New Since Your Last Visit
15009
Hits

ASP Classic Coding

Mike Prestwood
25. ASP Classic Exception Trapping (On Error)

Languages Focus: Exception Trapping

A common usage of exception handling is to obtain and use resources in a "try-it" block, deal with any exceptions in an "exceptions" block, and release the resources in some kind of "final" block which executes whether or not any exceptions are trapped.

ASP Classic Exception Trapping

17 years ago, and updated 17 years ago

Code
Nothing New Since Your Last Visit
10096
Hits

ASP Classic Coding

Mike Prestwood
26. ASP Classic File Extensions (.ASP)

.asp is the default extension for Active Server Pages (ASP) although some developers will change the default extension in an effort to add an additional security level. Although there is no clear standard for include files, using .INC is common but you must make sure that .INC files are not executed nor displayed.

17 years ago, and updated 16 years ago

Code
Nothing New Since Your Last Visit
8466
Hits

ASP Classic Coding

Mike Prestwood
27. ASP Classic Filter Records (Filter)

In ASP, using ADO, you filter a set of records using Filter.

15 years ago

Code
Nothing New Since Your Last Visit
9412
Hits

ASP Classic Coding

Mike Prestwood
28. ASP Classic Find Record (Find, Seek)

In ASP, using ADO, you use Find and Seek to move a cursor of a RecordSet to a matching record.

15 years ago

Code
Nothing New Since Your Last Visit
8714
Hits

ASP Classic Coding

Mike Prestwood
29. ASP Classic If Statement (If..ElseIf..Else..End If)

The End If is optional if you put your code on a single line.

Posted to KB Topic: Language Basics
17 years ago, and updated 16 years ago
(6 Comments , last by Aiden.C )

Code

KB Post
Nothing New Since Your Last Visit
37152
Hits

ASP Classic Coding

Mike Prestwood
30. ASP Classic Inheritance (Not Supported)

General Info: Inheritance

The concept of a class makes it possible to define subclasses that share some or all of the main class characteristics. This is called inheritance. Inheritance also allows you to reuse code more efficiently. In a class tree, inheritance is used to design classes vertically. (You can use Interfaces to design classes horizontally within a class tree.) With inheritance, you are defining an "is-a" relationship (i.e. a chow is-a dog). Analysts using UML call this generalization where you generalize specific classes into general parent classes.

ASP Classic Inheritance

Posted to KB Topic: OOP
17 years ago, and updated 16 years ago

Code
Nothing New Since Your Last Visit
9194
Hits

ASP Classic Coding

Mike Prestwood
31. ASP Classic Interfaces (Not Supported)

Although ASP Classic does support simple classes, it does not support interfaces.

Posted to KB Topic: OOP
17 years ago, and updated 16 years ago

Code
Nothing New Since Your Last Visit
9718
Hits

ASP Classic Coding

Mike Prestwood
32. ASP Classic Left

ASP Classic Left

Posted to KB Topic: Language Basics
17 years ago

Code
Nothing New Since Your Last Visit
8468
Hits

ASP Classic Coding

Mike Prestwood
33. ASP Classic Literals (quote)

Literals are quoted as in "Prestwood".  If you need to embed a quote use two quotes in a row.

Posted to KB Topic: Tool Basics
17 years ago, and updated 16 years ago
(1 Comments , last by calantha.m )

Code
Nothing New Since Your Last Visit
13017
Hits

ASP Classic Coding

Mike Prestwood
34. ASP Classic Logical Operators (and, or, not)

Same as VB. ASP Classic logical operators:

and and, as in this and that
or or, as in this or that
Not Not, as in Not This

Posted to KB Topic: Language Basics
16 years ago, and updated 16 years ago
(4 Comments , last by Chatlie.m )

Code

KB Post
Nothing New Since Your Last Visit  
36098
Hits

ASP Classic Coding

Mike Prestwood
35. ASP Classic Member Field

ASP Classic does support member fields, but, as usual, you cannot initialize the type nor value of a member field. The type is implied by usage.

Posted to KB Topic: OOP
17 years ago, and updated 16 years ago

Code
Nothing New Since Your Last Visit
9950
Hits

ASP Classic Coding

Mike Prestwood
36. ASP Classic Member Method (Sub, Function)

ASP classic uses the keywords sub and function. A sub does not return a value and a function does. Many programmers like to use the optional call keyword when calling a sub to indicate the call is to a procedure.

Posted to KB Topic: OOP
17 years ago, and updated 16 years ago

Code
Nothing New Since Your Last Visit
10942
Hits

ASP Classic Coding

Mike Prestwood
37. ASP Classic Member Modifiers (Default)

Other than visibility modifiers Public and Private, the only other member modifier available in ASP Classic is Default which is used only with the Public keyword in a class block. It indicates that the sub, function, or property is the default method for the class. You can have only one Default per class.

Posted to KB Topic: OOP
16 years ago

Code
Nothing New Since Your Last Visit
9409
Hits

ASP Classic Coding

Mike Prestwood
38. ASP Classic Member Property (Property..Get..Let)

ASP classic uses the property keyword and special Get and Let methods to both get and set the values of properties.

Posted to KB Topic: OOP
17 years ago, and updated 16 years ago
(58 Comments , last by onlinecrick. )

Code

KB Post
Nothing New Since Your Last Visit
16786
Hits

ASP Classic Coding

Mike Prestwood
39. ASP Classic Member Visibility (Private, Public)

The member visibility modifiers are Private and Public. If not specified, the default is Public. Private and Public have the usual meaning. Private members are visible only within the class block. Public members are visible within the class and outside of the class.

Posted to KB Topic: OOP
16 years ago

Code

Article
Nothing New Since Your Last Visit
21028
Hits

ASP Classic Coding

Mike Prestwood
40. ASP Classic Overloading (Not Supported)

ASP Classic does not support any type of overloading.

  • Operator - No.
  • Method - No.

Some developers like to pass in an array and then handle the array for a pseudo technique. Although not overloading, it's useful.

Posted to KB Topic: Language Details
17 years ago, and updated 16 years ago

Code
Nothing New Since Your Last Visit
13442
Hits

ASP Classic Coding

Mike Prestwood
41. ASP Classic Overview and History

Language Overview: Class-based language. Although you can create classes, ASP is not fully OOP. It is a traditional language with a few OOP extensions. You code in a traditional approach using functions, procedures, and global data, and you can make use of simple classes to help organize your reusable code.

Target Platforms: ASP Classic is most suitable for creating websites targeting any browser (IIS Web Server with ASP Classic installed or equivalent).

Posted to KB Topic: Tool Basics
17 years ago, and updated 16 years ago
(1 Comments , last by bonniee.m )

Code
Nothing New Since Your Last Visit
9169
Hits

ASP Classic Coding

Mike Prestwood
42. ASP Classic Parameters (ByRef, ByVal)

By Reference or Value
For parameters, you can optionally specify ByVal or ByRef. ByRef is the default if you don't specify.

17 years ago, and updated 16 years ago

Code
Nothing New Since Your Last Visit  
13236
Hits

ASP Classic Coding

Mike Prestwood
43. ASP Classic Record Movement (MoveFirst, MoveLast, MoveNext)

ASP uses MoveFirst, MoveLast, MoveNext, and MovePrevious to move a database cursor (a RecordSet).

objRecordSet.MoveNext
15 years ago
(3 Comments , last by fuzail.f )

Code
Nothing New Since Your Last Visit
19438
Hits

ASP Classic Coding

Mike Prestwood
44. ASP Classic Report Tools Overview

Because ASP Classic targets a client browser (a document interfaced GUI), a common solution is to simply output an HTML formatted page with black text and a white background (not much control but it does work for some situations).

Posted to KB Topic: Tool Basics
17 years ago, and updated 17 years ago
(4 Comments , last by maria.k )

Code
Nothing New Since Your Last Visit
12089
Hits

ASP Classic Coding

Mike Prestwood
45. ASP Classic Self Keyword (me)

Same as VB. The Me keyword is a built-in variable that refers to the class where the code is executing.

Posted to KB Topic: Language Details
16 years ago

Code
Nothing New Since Your Last Visit
13768
Hits

ASP Classic Coding

Mike Prestwood
46. ASP Classic Sort Records (Sort)

In ASP, using ADO, you sort a set of records using the Sort property.

15 years ago
(1 Comments , last by Levi.M )

Code
Nothing New Since Your Last Visit
9352
Hits

ASP Classic Coding

Mike Prestwood
47. ASP Classic Static Members (Not Supported)

Although ASP Classic supports the creation of simple classes, it does not support static methods.

Posted to KB Topic: OOP
17 years ago, and updated 16 years ago

Code
Nothing New Since Your Last Visit
12404
Hits

ASP Classic Coding

Mike Prestwood
48. ASP Classic String Concatenation (& or +)

Although you can use either a & or a + to concatenate values, my preference is to use a + because more languages use it. However, if you use & then some type conversions are done for you. If you use + you will sometimes have to cast a value to concatenate it. For example, you will have to use CStr to cast a number to a string if you use the + operator as a concatenation operator.

Posted to KB Topic: Tool Basics
17 years ago, and updated 16 years ago
(3 Comments , last by Zac.M )

Code
Nothing New Since Your Last Visit
18230
Hits

ASP Classic Coding

Mike Prestwood
49. ASP Classic Unary Operators

An operation with only one operand (a single input) such as + and -.

Posted to KB Topic: Tool Basics
17 years ago, and updated 16 years ago

Code
Nothing New Since Your Last Visit
9916
Hits

ASP Classic Coding

Mike Prestwood
50. ASP Classic Variables (Dim x)

ASP Classic is a loosely typed language. No variable types in ASP (all variables are variants). Declaring variables is even optional unless you use the Option Explicit statement to force explicit declaration of all variables with Dim in that script. Using Option Explicit is strongly recommended to avoid incorrectly typing an existing variable and to avoid any confusion about variable scope.

For example, at the top of my common include file, I have the following:

<%@LANGUAGE=VBScript%>
<%
Option Explicit
'...more code here.
%>
Posted to KB Topic: Tool Basics
17 years ago, and updated 16 years ago

Code
Nothing New Since Your Last Visit
10075
Hits

ASP Classic Coding

Mike Prestwood
51. ASP Classic Yes/No Function

The following function demonstrates one technique for coding a Yes/No dropdown. It uses a for loop which can be expanded to handle more than the 3 states (Y, N, and blank).

Example of calling the function:

Do you fish? <%=YesNoDropDown("ynFish", "")%>
15 years ago
(7 Comments , last by Natalie.Z )

Code
Nothing New Since Your Last Visit
9690
Hits

ASP Classic Coding

Mike Prestwood
52. ASP Constant Naming Convention When naming constants, Microsoft suggests you prefix each constant with "con" as in conYourConstant. Although, they also say the older all caps with words separated by an underscore is still acceptable (i.e. YOUR_CONSTANT).
17 years ago, and updated 17 years ago

Tip
Nothing New Since Your Last Visit
12429
Hits

ASP Classic Coding

Mike Prestwood
53. ASP redirect http to https

To redirect from http to https, check the Request.ServerVariables HTTPS field and then use Response.Redirect if set to "off".

Posted to KB Topic: Language Basics
21 years ago, and updated 16 years ago

Code
Nothing New Since Your Last Visit
11312
Hits

ASP Classic Coding

Mike Prestwood
54. ASPSuite Developers Blog Developer blog journal for our ASPSuite product. This blog is intended for the Prestwood ASP Classic developers.
19 years ago, and updated 18 years ago
, last by mprestwood )

Blog
Nothing New Since Your Last Visit
13034
Hits

ASP Classic Coding

Mike Prestwood
55. Associative Arrays in ASP Classic

What is the syntax in ASP Classic for using an associative array?

Posted to KB Topic: Language Details
17 years ago, and updated 15 years ago
(3 Comments , last by Donnavan.L )

FAQ
Nothing New Since Your Last Visit
31850
Hits

ASP Classic Coding

Mike Prestwood
56. Buffer a RecordSet in an application variable In ASP, you can buffer a RecordSet in either a session or application variable. This code snippet shows you how to create a reusable method for buffering RecordSets in an application variable.
Posted to KB Topic: Language Basics
19 years ago, and updated 18 years ago

KB Post
Nothing New Since Your Last Visit
11149
Hits

ASP Classic Coding

Mike Prestwood
57. Can ASP edit Access/SQL views? Can you edit Access and MS SQL Server views?
Posted to KB Topic: Tool Basics
17 years ago
(1 Comments , last by bonniee.m )

FAQ
Nothing New Since Your Last Visit
13002
Hits

ASP Classic Coding

Mike Prestwood
58. CBool(ANumber Mod 2) The following function returns true if the integer portion of a number passed in is odd; otherwise, it returns false.
Posted to KB Topic: Language Basics
17 years ago

Code
Nothing New Since Your Last Visit
7401
Hits

ASP Classic Coding

Mike Prestwood
59. CDO (Collaboration Data Objects) Using CDO to send email.
22 years ago
(1 Comments , last by Donald.S4 )

KB Post
Nothing New Since Your Last Visit
9021
Hits

ASP Classic Coding

Mike Prestwood
60. Clear Application and Session Variables Using ASP classic

Use Application.Contents.RemoveAll and Session.Contents.RemoveAll

Posted to KB Topic: Language Basics
18 years ago, and updated 15 years ago
(1 Comments , last by Uwais.Q )

KB Post
Nothing New Since Your Last Visit
38979
Hits

ASP Classic Coding

Adam Lum
61. Creating a Class in ASP Create a basic Class in ASP
Posted to KB Topic: Tool Basics
19 years ago, and updated 17 years ago
(4 Comments , last by coca.m )

KB Post
Nothing New Since Your Last Visit
11439
Hits

ASP Classic Coding

Mike Prestwood
62. DateDiff vbMonday ww Week of Year This code returns the current week of the current year with a week starting on Monday.
18 years ago

Code
Nothing New Since Your Last Visit
12197
Hits

ASP Classic Coding

Mike Prestwood
63. error '80020009' error '80020009' YourPage.asp, line xxxx
17 years ago, and updated 17 years ago

Error
Nothing New Since Your Last Visit
15682
Hits

ASP Classic Coding

Mike Prestwood
64. Find Last Day of Week

How do you find last Monday? I want to return a date for last Monday or today if today is Monday.

18 years ago, and updated 16 years ago
(4 Comments , last by Daniel.P )

FAQ
Nothing New Since Your Last Visit
15070
Hits

ASP Classic Coding

Mike Prestwood
65. Get Browser Width Many users these days have very wide screens. This article shows you how to determine the browser width using ASP classic.
Posted to KB Topic: Language Basics
17 years ago, and updated 17 years ago

KB Post
Nothing New Since Your Last Visit
11871
Hits

ASP Classic Coding

Mike Prestwood
66. Get Count of Field Types in a Table Code sample to get a count of the number of fields in a table of a particular field type (a particular DataTypeEnum).
Posted to KB Topic: Language Basics
19 years ago
(1 Comments , last by Arlo.K )

KB Post
Nothing New Since Your Last Visit
10209
Hits

ASP Classic Coding

Mike Prestwood
67. Get GMT Server Offset You can use JavaScript to set an IIS App var to the GMT server difference. Then use that number in your code.
Posted to KB Topic: Language Basics
18 years ago
(4 Comments , last by James.C6 )

KB Post
Nothing New Since Your Last Visit
23838
Hits

ASP Classic Coding

Mike Prestwood
68. GetStringCount with Split and UBound

This function uses Split to count the number of strings within a string.

Posted to KB Topic: Language Basics
17 years ago, and updated 17 years ago
(1 Comments , last by Uwais.Q )

Code
Nothing New Since Your Last Visit
12657
Hits

ASP Classic Coding

Mike Prestwood
70. How do I determine which version of IIS I am running? The following ASP Classic code displays the version of the Internet Information Services (IIS) you are running in the form of a text string (i.e. Microsoft-IIS/6.0).
18 years ago

Code
Nothing New Since Your Last Visit
7451
Hits

ASP Classic Coding

Mike Prestwood
71. If Statement: No Short Circuit

Short-circuit evaluation is a feature of most languages where once an evaluation evaluates to False, the compiler evaluates the whole expression to False, exits and moves on to the next code execution line. The ASP Classic if statement does not support short-circuit evaluation but you can mimic it. Use either an if..else if..else if statement or nested if statements. ASP code that makes use of this technique is frequenlty clearer and easier to maintain than the short-circuit equivalent.

Posted to KB Topic: Language Basics
17 years ago, and updated 16 years ago

Tip
Nothing New Since Your Last Visit  
23386
Hits

ASP Classic Coding

Mike Prestwood
72. Loop Through Form Fields Code Snippet This code snippet shows you how to loop through a form's fields.
Posted to KB Topic: Language Basics
19 years ago, and updated 19 years ago
(2 Comments , last by Hunter.m )

KB Post
Nothing New Since Your Last Visit
8596
Hits

ASP Classic Coding

Mike Prestwood
73. Random Numbers with Rnd and Randomize Call randomize then call Rnd to generate a random number between 0 and 1.
Posted to KB Topic: Language Basics
18 years ago, and updated 17 years ago
(1 Comments , last by Patsy.B )

KB Post
Nothing New Since Your Last Visit
12529
Hits

ASP Classic Coding

Mike Prestwood
74. Random Numbers with Rnd and Randomize Call randomize then call Rnd to generate a random number between 0 and 1. The following generates a random number from the low to high number including the low and high numbers:
Posted to KB Topic: Language Basics
18 years ago, and updated 18 years ago

Code
Nothing New Since Your Last Visit
11271
Hits

ASP Classic Coding

Kim Berry
75. Read/Write from ASP to create a page from template The Scripting object provides reading and writing of files. By adding a string replace in each line, ASP content can reside in a DB and inserted into the desired template.
Posted to KB Topic: Language Basics
23 years ago, and updated 17 years ago

KB Post
Nothing New Since Your Last Visit
7451
Hits

ASP Classic Coding

Mike Prestwood
76. RecordSet Properties, Methods, and Events Using a RecordSet's properties, methods and events.
Posted to KB Topic: Language Details
19 years ago

KB Post
Nothing New Since Your Last Visit
9487
Hits

ASP Classic Coding

Mike Prestwood
77. Response.Flush and Response.Buffer

Response.Flush sends the contents of the buffer to the browser. This command is useful for showing a visitor something while slow loading pages load.

Posted to KB Topic: Language Details
19 years ago, and updated 15 years ago
(14 Comments , last by joe.e )

KB Post
Nothing New Since Your Last Visit
42295
Hits

ASP Classic Coding

Adam Lum
78. Response.Redirect vs. Server.Transfer

A quick comparison.

18 years ago, and updated 16 years ago
(1 Comments , last by Diana.G )

KB Post
Nothing New Since Your Last Visit  
12931
Hits

ASP Classic Coding

Mike Prestwood
79. Response.Write Assignment Operator This is a simple example of passing a value to a JavaScript function. You can pass values to JavaScript the same way you pass values to HTML.
Posted to KB Topic: Tool Basics
17 years ago

Code
Nothing New Since Your Last Visit
8279
Hits

ASP Classic Coding

Mike Prestwood
80. Scripting.FileSystemObject The following function uses the FileSystemObject to delete a file.
Posted to KB Topic: Language Basics
17 years ago

Code
Nothing New Since Your Last Visit
7108
Hits

ASP Classic Coding

Mike Prestwood
81. Scripting.FileSystemObject The following function uses the Scripting.FileSystemObject to check for the existence of a file.
Posted to KB Topic: Language Basics
17 years ago
(3 Comments , last by Story.R )

Code
Nothing New Since Your Last Visit
7791
Hits

ASP Classic Coding

Mike Prestwood
82. Send email with ASPMail

How to use ASPMail to send email from your web site.

Posted to KB Topic: Language Basics
22 years ago, and updated 19 years ago
(1 Comments , last by Anonymous )

KB Post
Nothing New Since Your Last Visit
162172
Hits

ASP Classic Coding

Mike Prestwood
83. Setting to null or empty and checking Use IsEmpty or Len > 0 to test
When clearing, set to Null (not "")
22 years ago, and updated 18 years ago
(2 Comments , last by Sparkebe.C )

KB Post
Nothing New Since Your Last Visit
11839
Hits

ASP Classic Coding

Adam Lum
84. Setting up your Web Server to Run ASP Scripts Running ASP on IIS
19 years ago

KB Post
Nothing New Since Your Last Visit
7320
Hits

ASP Classic Coding

Mike Prestwood
85. Sun Java System Active Server Pages Run ASP pages on Linux/Unix! This software was originally developed by ChiliSoft.
17 years ago

Download
Nothing New Since Your Last Visit
14734
Hits

ASP Classic Coding

Mike Prestwood
86. Using On Error Resume Next You can use "On Error Resume Next" to suppress errors and "On Error Goto 0" to stop suppressing errors.
Posted to KB Topic: Language Basics
19 years ago, and updated 17 years ago
(4 Comments , last by Uwais.Q )

KB Post
Nothing New Since Your Last Visit
39729
Hits

ASP Classic Coding

Mike Prestwood
87. Using Request.QueryString Although you can use the generic request collection, as in Request("SomeValue"), for either Request.Form("SomeValue") or Request.QueryString("SomeValue"), it's best to avoid the generic request collection until it's really needed. Use a For Each loop to loop through elements.
Posted to KB Topic: Language Details
18 years ago, and updated 17 years ago
(5 Comments , last by Marcia.m )

Tip
Nothing New Since Your Last Visit
19066
Hits

ASP Classic Coding

Mike Prestwood
88. VBScript What does VBScript stand for?
17 years ago

FAQ
Nothing New Since Your Last Visit
11735
Hits

ASP Classic Coding

Mike Prestwood
90. Weekday and WeekdayName Use Weekday and WeekdayName to return the day of week in ASP.
Posted to KB Topic: Language Details
22 years ago
(2 Comments , last by Frances.B )

KB Post
Nothing New Since Your Last Visit
9960
Hits

ASP Classic Coding

Icon Legend:
Since your last logged visit:
- New to you or updated since your last visit (sign in now to activate).
- NOT new to you since your last visit (sign in now to activate).

New ASP Classic Coding Knowledge Base Post...

Share your knowledge with the WORLD! In addition to adding comments to existing posts, you can post knowledge you've acquired. We welcome full articles (intro with screen shots), general posts (shorter), and tidbits (tips, FAQs, definitions, etc.).

Post New...

Tidbit Post: Short Flashcard FAQ Definition Quick Tip Code Snippet
Longer Post: Full Article General Post File Link Error News
Other: Blog Topic
Or, if YOU have a question...
  ASP Classic Coding Message Board
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2025 Prestwood IT Solutions.   [Security & Privacy]