Skip to content

Instantly share code, notes, and snippets.

@craigholdheide

craigholdheide/Index.cshtml Secret

Created Aug 24, 2019
Embed
What would you like to do?
@model List<MvcExample.Models.Product>
@{
ViewBag.Title = "Home Page";
}
<br /><br />
<div class="row">
<div class="col-md-12">
<table class="table table-bordered">
<thead>
<tr>
<td>
Name
</td>
<td>
Price
</td>
<td>
Stock
</td>
</tr>
</thead>
<tbody>
@foreach (var product in Model)
{
<tr>
<td>@product.Name</td>
<td>@product.Price</td>
<td>@product.Stock</td>
</tr>
}
</tbody>
</table>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment