In this tutorial I will teach you how to make a loop statement and arrays in
ASP.NET.
Included:
For Loops
For Each Loops
While Loops
Arrays
Source Code
For Loops
If you need to run the same statements repeatedly, you can make a program that loop.
If you know how many times you want to loop, you can use a for loop. This kind of loop is especially useful for counting up or counting down.
<!DOCTYPE html>
<html>
<head>
</head>
<body>
@For i=10 To 21
@<p>Line #@i</p>
</body>
</html>
For Each Loops
If you work with a collection or an array, you often to use a for each loop. A collection is a group of similar objects, and the for each loop lets you carry out a task on each item. The for each loop walks through a collection until it is finished the process.
<!DOCTYPE html>
<html>
<body>
<ul>
@For Each r In Request
.ServerVariables
@<li>@r</li>
</ul>
</body>
</html>

And if you want a
Full Source Code just
Download the file in the download button below. Thanks and I hope you learn it. Enjoy Coding.