I have a texbox and 3 radio buttons associated with that textbox. Below is the code.
for (int advancedSkills = 0; advancedSkills <= 0; advancedSkills++)
{
<div class="row" id="experienceTexts">
<div class="col-md-3">
@Html.TextBoxFor(model => Model.ClinicalQ2textAnswers[advancedSkills].clinicalExpDetails, new { @onclick = "onClinicalTextChanged(this)" })
@Html.HiddenFor(m => Model.ClinicalQ2textAnswers[advancedSkills].AnswerID)
@Html.HiddenFor(m => Model.ClinicalQ2textAnswers[advancedSkills].AnswerDescription)
</div>
@for (int i = 0; i < Model.ClinicalQ2ExpAnswers.Count(); i++)
{
<div class="col-md-3">
@Html.RadioButtonFor(m => Model.ClinicalQ2SelectedExpAnswers[advancedSkills], Model.ClinicalQ2ExpAnswers[i].AnswerID)
@Html.HiddenFor(m => Model.ClinicalQ2ExpAnswers[i].AnswerID)
@Html.HiddenFor(m => Model.ClinicalQ2ExpAnswers[i].AnswerDescription)
</div>
}
</div>
<br />
}
Now I want a link or button (which is easier) like: + click to add more skills . This should add another textbox and its related radiobuttons.
How can I do that? And it should bind it to model also each time I click the + symbol. So If I press that 4 times, 4 textboxes and its radiobutton values should bind to model.