Enum:
public enum Enumenter
{
Products = 10,
Users = 20,
Actions = 30
}
my view:
@model IEnumerable<ServerDB.Tables.EntityType>
@{
ViewBag.Title = "Infrastruktur";
}
<table class="table">
<tr>
<th>
<h2>Infrastruktur</h2>
</th>
<th></th>
</tr>
@foreach (var val in Enum.GetNames(typeof(ServerDB.Tables.Enum)))
{
<tr>
<td>
@Html.DisplayName((String.Format("{0}{1}", val, "2")))
</td>
<td></td>
<td>
<p>
</p>
</td>
<td></td>
</tr>
}
@foreach (var Ost in Enum.(typeof(ServerDB.Tables.Enum)))
{
@Html.DisplayName((String.Format("{0}", Ost)))
}
</table>
How do i Print out The values next to the products? im going to use the numbers from the enum to make a query search, so i can search for any product, any users or actions for that matter. im no expert in this, so please be gentle.