ASP.NET RazorLesson 25Free preview
Razor VB Loops
This lesson is part of ASP · All levels
Summary
Repetitions in VB-language Razor use classic syntax such as For Each, For, and Do While. Each loop block can directly generate HTML elements so that the list of data can be rendered repeatedly. Knowing the difference between Do While and Do Until is important for the logic of repetition as needed. (.Next)
Key points
- For Each... searches through the entire collection.
- For i = beginning To end can be given a step by the word Step.
- Do While running the block while the condition is still right.
- Continue For continues the next iteration, Exit For stops the loop.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.