Subscribe
Tutorial search

ASP Loop Tutorials


Sort by:
Decision Making and Looping in ASP
Decision Making and Looping in ASP
An introductory look at using the VBScript deicision making (if-then-else, select-case) and looping (for, while, do) mechanisms in ASP pages.
Difficulty:
Color Safe Palette or Nested For Next Loops & Arrays
Color Safe Palette or Nested For Next Loops & Arrays
The browser can do a great many things, but it has a limit of 216 colors that can "safely" (without dithering or color washout) display. Fortunately, there are many ways that you can display all the color combinations in the browser safe color palette. By placing the six possible values for color (00,33,66,99,CC,FF) in an array and nesting three for next statements with values one through six a table with all the color codes will neatly be displayed in a table.
Difficulty:
Control Structures - Looping Logic -
Control Structures - Looping Logic -
These control structures run code repeatedly until certain conditions are met, or while certain conditions are true.
Difficulty:
Multiple Form Selection
Multiple Form Selection
Allowing multiple choices of data elements enables people to customize views of your data and adds value to your applications. In this sample code, user inputted choice(s) are added to the basic sql statement to draw them from the db. Since the input from the dropdown menu comes through comma delimited it is simply written into the statement without modification. Two simple for next loops determine which elements are part of the record set and displays them accordingly.
Difficulty:
Do...Loop / Select...Case Instructions
Do...Loop / Select...Case Instructions
This tutorial covers several important Active Server Pages looping structures, including do..while, do..until, and select case structures.
Difficulty:
Loops within Loops: Coding an ASP-based Bulletin Board
Loops within Loops: Coding an ASP-based Bulletin Board
This article provides an easy way to list nested forums. It does have some drawbacks, though. For starters, there is an upper-bound on the number of nested replies a message can have. In this example, the number is 12, although this is configurable. Furthermore, this approach is not the most efficient approach, and could be streamlined using stored procedures and fewer ADO objects within the code.
Difficulty:
Search Term(s) (1): loop