IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
ASP Classic
Search ASP Classic Group:

Advanced
-Collapse +Expand ASP Classic Store

Prestwood eMagazine

February Edition
Subscribe now! It's Free!
Enter your email:

   ► KB ►► Website Scri...ASP Classic   Print This    All Groups  

ASP Classic Coding Most Read KB Posts

Page Contents


Most Read KB Articles Since 3/28/2008

ASP Classic Coding Group

  KB Article    

Mike Prestwood
1. 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
161159
Hits

Mike Prestwood
2. 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
51455
Hits

Mike Prestwood
3. 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.

Posted to KB Topic: ASP Classic
16 years ago, and updated 15 years ago
(4 Comments , last by Eugene.P )

Code

Article
Nothing New Since Your Last Visit  
48819
Hits

Mike Prestwood
4. 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
42029
Hits

Mike Prestwood
5. 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
39574
Hits

Mike Prestwood
6. 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
38746
Hits

Mike Prestwood
7. 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
36960
Hits

Mike Prestwood
8. 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  
36913
Hits

Mike Prestwood
9. 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
36741
Hits

Mike Prestwood
10. 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  
35893
Hits



Most Read by Members

ASP Classic Coding Group

  KB Article    

Mike Prestwood
1. 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
16578
Hits

Mike Prestwood
2. 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
36741
Hits

Mike Prestwood
3. 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
9252
Hits

Mike Prestwood
4. 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
36960
Hits

Mike Prestwood
5. 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
42029
Hits

Mike Prestwood
6. 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
18800
Hits

Mike Prestwood
7. 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", "")%>
Posted to KB Topic: ASP Classic
15 years ago
(7 Comments , last by Natalie.Z )

Code
Nothing New Since Your Last Visit
9522
Hits

Mike Prestwood
8. 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  
36913
Hits

Mike Prestwood
9. 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
29259
Hits

Mike Prestwood
10. 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
7650
Hits
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).
Sales Website: www.prestwood.com Or visit our legacy sales site: 
legacy.prestwood.com


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