my index view has a model that looks like this:
@model IEnumerable<WebSurvey.Data.Models.Question>
and is used by this:
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Question1)
</td>
<td>
@Html.DisplayFor(modelItem => item.ReplyOptions)
</td>
<td>
@Html.DisplayFor(modelItem => item.Group)
</td>
<tr>
}
</tbody>
but i also need a model that looks like this:
@model WebSurvey.Data.Models.Question
so that I can use the properties of "Questions" in "asp-for" to create a new Question, because it does not work with the current model.
My question: Is there a way to create another model in my view?
Hope you can help me out :)