I want to load multiple partials inside a specific div. The amount of partials is given through by the user. Example: whenever a user want to buy traintickets, he needs to specify how many passengers will go with him. When the number of passengers had been chosen, new partials (passenger info forms),need to be loaded. If user selects 5 passenger, 5 partials need to be loaded dynamically. This is my existing code, but it isn't working: (to give you an idea)
$("#numberofpassengers").change(function() {
var strNumb = $('#numberofpassengers').val().toString();
var intNumb = parseInt(strNumb);
for (var i = 1; i < intNumb; i++) {
Html.Partial("_PassengerForm");
}
});