Last active
April 9, 2020 23:39
-
-
Save ncarandini/02a93222bf71add1f5b2d1e2fae6faae to your computer and use it in GitHub Desktop.
A double for cycle to solve
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@page "/MyPage" | |
<h3>Show images</h3> | |
@for (int i = 0; i < LabImages.Count; i += imagesPerRow) | |
{ | |
<div class="card-deck"> | |
@for(int j = i; j < i + imagesPerRow && j < LabImages.Count; j++) | |
{ | |
<div class="card"> | |
<img class="card-img-top" src="..." alt="Card image cap"> | |
<div class="card-body"> | |
<h5 class="card-title">Title</h5> | |
<p class="card-text">Bytes: Length</p> | |
</div> | |
</div> | |
} | |
</div> | |
} | |
@code{ | |
private int imagesPerRow = 4; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment