I.T. Discussion Community!
-Collapse +Expand
ASP Classic
Search ASP Classic Group:

Advanced
-Collapse +Expand ASP Classic Store

Prestwood eMagazine

May 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
16 years ago, and updated 13 years ago
(1 Comments , last by Anonymous )

KB Post
Nothing New Since Your Last Visit
156760
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
11 years ago, and updated 10 years ago

Code

KB Post
Nothing New Since Your Last Visit
45752
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
10 years ago, and updated 9 years ago
(4 Comments , last by Eugene.P )

Code

Article
Nothing New Since Your Last Visit  
42009
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
13 years ago, and updated 9 years ago
(4 Comments , last by Pervez.J )

KB Post
Nothing New Since Your Last Visit
37867
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
13 years ago, and updated 11 years ago
(4 Comments , last by Uwais.Q )

KB Post
Nothing New Since Your Last Visit
35584
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
12 years ago, and updated 9 years ago
(1 Comments , last by Uwais.Q )

KB Post
Nothing New Since Your Last Visit
34411
Hits

Mike Prestwood
7. 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
11 years ago, and updated 10 years ago
(20 Comments , last by bukrans.m )

Code
Nothing New Since Your Last Visit
32945
Hits

Mike Prestwood
8. 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
11 years ago, and updated 10 years ago
(5 Comments , last by Michael.J3 )

Code

KB Post
Nothing New Since Your Last Visit
32111
Hits

Mike Prestwood
9. 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
10 years ago, and updated 10 years ago
(1 Comments , last by Anonymous )

Code

KB Post
Nothing New Since Your Last Visit  
31118
Hits

Mike Prestwood
10. Associative Arrays in ASP Classic

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

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

FAQ
Nothing New Since Your Last Visit
27448
Hits



Most Read by Members

ASP Classic Coding Group

  KB Article    

Mike Prestwood
1. 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
11 years ago, and updated 10 years ago
(20 Comments , last by bukrans.m )

Code
Nothing New Since Your Last Visit
32945
Hits

Mike Prestwood
2. 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
12 years ago, and updated 11 years ago
(5 Comments , last by Marcia.m )

Tip
Nothing New Since Your Last Visit
15593
Hits

Mike Prestwood
3. 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
11 years ago, and updated 10 years ago
(5 Comments , last by Michael.J3 )

Code

KB Post
Nothing New Since Your Last Visit
32111
Hits

Mike Prestwood
4. Send email with ASPMail

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

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

KB Post
Nothing New Since Your Last Visit
156760
Hits

Mike Prestwood
5. 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
10 years ago, and updated 10 years ago
(4 Comments , last by Chatlie.m )

Code

KB Post
Nothing New Since Your Last Visit  
24262
Hits

Mike Prestwood
6. 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
11 years ago, and updated 10 years ago
(3 Comments , last by Zac.M )

Code
Nothing New Since Your Last Visit
14892
Hits

Mike Prestwood
7. Associative Arrays in ASP Classic

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

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

FAQ
Nothing New Since Your Last Visit
27448
Hits

Mike Prestwood
8. 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
11 years ago, and updated 11 years ago
(4 Comments , last by maria.k )

Code
Nothing New Since Your Last Visit
9580
Hits

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

Save as VB Classic.

Posted to KB Topic: Tool Basics
11 years ago, and updated 10 years ago
(6 Comments , last by Tyrone.P )

Code

KB Post
Nothing New Since Your Last Visit
24631
Hits

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

Posted to KB Topic: ASP Classic
11 years ago, and updated 10 years ago
(4 Comments , last by WilliamE.G.W )

Code
Nothing New Since Your Last Visit  
16958
Hits
Icon Legend:
Recent or not:
- Recent activity (within last two weeks).
- No activity last two weeks.
 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).
Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech