Control Structure

Control structure—like all the other words and phrases that you’ve encountered so far that have made you think, “What the heck is that?”—is just as simple to understand when explained in plain English.

When creating dynamic web applications, there are two types of code you program: code that always executes and code that conditionally executes. Control structure deals with the latter. It deals with controlling the flow of code that executes based on conditions.

At its heart, control structure is checking to see whether something is true or false and running code based on the answer.

In real life, we do this type of thing all the time as we go about our day. We may have never have identified the processes or even considered ...

Get ASP.NET for Web Designers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.