now instead of doing a foreach loop I want to add these <partial/> views with the click of a button, I plan on doing this by making a controller return the partial view and I'll just append it to the parent div via an ajax call using jquery, I have the following action in the controller below
public async Task<IActionResult> AssistanceDataForm(Assistance parentAssistance, int assistanceIndex, int assistanceDataIndex) { return PartialView("Encoder/AssistanceDataForm", assistanceData); }
public async Task<IActionResult> AssistanceDataForm(Assistance parentAssistance, int assistanceIndex, int assistanceDataIndex) { return PartialView("Encoder/AssistanceDataForm", assistanceData); }