I have an ASP .NET Core MVC web page that shows the names of jurors within a panel. The number of panels or jurors aren't fixed, so basically I build the view by looping through the available panels and then by looping through the available jurors:
- @foreach (var panel in Model.PanelComposition)
- {
- <div class="row">
- <div class="col">
- <p class="font-weight-bold">@panel.Functie:</p>
- </div>
- <div class="col">
- @panel.JuryName
- </div>
- </div>
- }
For every juror, I display his/her function and full name.
The next step would be to create an edit page for the same data, the idea being to offer a listing of all available jurors through combo boxes. But, I would then have to create a combo box for each available function and post the data back to the controller so I can save the data.
I'm basically wondering how I would do this in a safe & elegant fashion?