ASP Classic Coding Tech Articles

These Articles are contributed by you (our online community members). They are organized by our knowledge base topics. Specifically, by the ASP Classic sub-topics.
|
34 ASP Classic Coding Articles
Group: ASP Classic Coding
Topic: ASP Classic
Setting ADO objects to Nothing without first closing them might cause ASPMail to fail
Posted By Kim Berry,
Post #100079, KB Topic: ASP Classic
+Add Comment
( 1 Comments)
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.
+Add Comment
( 2 Comments)
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.
+Add Comment
( 4 Comments)
Developer blog journal for our ASPSuite product. This blog is intended for the Prestwood ASP Classic developers.
+Add Comment
( 16 Comments)
Topic: Tool Basics
Topic: Language Basics
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 |
+Add Comment
( 4 Comments)
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.
+Add Comment
Many users these days have very wide screens. This article shows you how to determine the browser width using ASP classic.
+Add Comment
Code sample to get a count of the number of fields in a table of a particular field type (a particular DataTypeEnum).
+Add Comment
( 1 Comments)
You can use JavaScript to set an IIS App var to the GMT server difference. Then use that number in your code.
+Add Comment
( 4 Comments)
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 By Kim Berry,
Post #100020, KB Topic: Language Basics
+Add Comment
You can use "On Error Resume Next" to suppress errors and "On Error Goto 0" to stop suppressing errors.
+Add Comment
( 4 Comments)
Topic: Language Details
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")
+Add Comment
( 2 Comments)
Using a RecordSet's properties, methods and events.
+Add Comment
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.
+Add Comment
( 14 Comments)
Topic: OOP
Ultra-primitive (no inheritance) but useful and encourages you to think and design using objects.
+Add Comment
( 2 Comments)
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.
+Add Comment
( 7 Comments)
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.
+Add Comment
( 1 Comments)
ASP classic uses the property keyword and special Get and Let methods to both get and set the values of properties.
+Add Comment
( 58 Comments)
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.
+Add Comment
|
|