I generate a partial view
@model IEnumerable<ViewModel.vm_Master_QuestionSet_AnswerOptions>
@foreach (var item in Model)
{
<div class="form-group">
@Html.LabelFor(m => item.AnswerShownOrder, item.AnswerShownOrder.ToString(), new { @class = "control-label col-md-3 col-sm-3 col-xs-12" })
<div class="col-md-4 col-sm-4 col-xs-4">
@Html.TextBoxFor(m => item.AnswerOptionText, new { @class = "form-control", @id = item.PK_MasterQuestion_AnswerOptionID })
</div>
<div class="col-md-2 col-sm-2 col-xs-2">
@Html.CheckBoxFor(m => item.CorrectAnswer, new { @class = "form-control", @id = "chk" + item.PK_MasterQuestion_AnswerOptionID })
</div>
</div>
}
when but created control's name start with item.please see bellow image
in class I have 2 properties
public ICollection<string> AnswerOptionText { get; set; }
public ICollection<bool> CorrectAnswer { get; set; }
and values are not mapped if names are generate like this.
why its generate like this?and how I can prevent this?