Free templates
Menu Search Free templates

For and For Each loops (C#, VB and ASP.NET) | Free code

Here you can download free code (C# and VB) to create a For loop to search through a list line by line and execute the same code on each line in the list.

A For loop is useful in code when there is a need to search through a list of data line by line to perform the same operations on each line in this list. A For loop means that a row in a data list is selected, that code is executed on this row and then will the next row be selected until the end of the list has been reached as specified in the code.

In this template with free code (C# and VB) for a For loop are there four examples of For loops that is used for four different problems. The first example shows loop through an array where we add a link to a Literal control for each row that is selected. In the second example are we going through a series of numbers from 0 to a given number and add a link for each number. In the third example do we loop through a Repeater control to retrieve data from each row and in the fourth example do we look through the nodes in an XML file.

Remember that you in your web hosting account must have made a setting for the correct version of "ASP.NET" on your website (the version listed in the "Web.config" file). We are using Visual Web Developer 2005 (2010) Express Edition for web programming.
Updated: 01/01/2015 | Created by All-templates.biz

Download For and For Each loops (C#, VB and ASP.NET) | Free code ยป

Tags: web code loop