Aliendreamer

enum in razor page

Nov 24th, 2018
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.25 KB | None | 0 0
  1.     @foreach (ProductType type in Enum.GetValues(typeof(ProductType)))
  2.             {
  3.                 <label>
  4.                     <input asp-for="Type" type="radio" value="@type" />
  5.                     @type
  6.                 </label>
  7.             }
Advertisement
Add Comment
Please, Sign In to add comment