title: Dynamically populate ASP.NET MVC 3 Editor Templates based on selection in a dropdown
body: <p>I am using ASP.NET MVC 3 and am attempting to populate a list of editor templates dynamically based on the selection made in a dropdown. I have no code to post because I am not sure what is the best way to achieve my purpose. My question is not how to use editor templates, but how to use editor templates when the list of related objects changes based on a user selection of the "parent".</p>
  
  <p><strong>Background</strong>:</p>
  
  <p>Employees need to complete training checklists for operations they are trained on. The employee will select a checklist template from a dropdown menu, and then checklist items will populate based on the selected checklist template. (Each template has a different set of related items.) Each checklist item is associated with a blank response that the user must mark was completed. The checklist item is for display only; the response is what is being edited.</p>
  
  <p>I know I can populate the checklist items via AJAX &amp; Json, but is there a way to do this using editor templates--with the result of checklist items dynamically displaying based on the checklist template selected? One solution is to use one page to select the template, and then another page to display the checklist items; I would like to avoid this and keep everything on one page if possible. The goal is to populate the checklist items (and blank responses) based on the checklist template selected.</p>
  
  <p><strong>Caveat</strong>:
  Each checklist will have a predefined number of blank responses based on what items are related to the checklist template, so the list size will not change during the completion of the form.</p>
  
  <p><strong>Model</strong>:</p>
  
  <p>[ChecklistTemplate]  1------------* [ChecklistItem]</p>
  
  <p>[ChecklistTemplate]  1------------* [Checklist]</p>
  
  <p>[Checklist]          1------------* [ChecklistResponse]</p>
  
  <p>[ChecklistResponse]  *------------1 [ChecklistItem]</p>
  
  <p>Any and all help is appreciated. Thank you.</p>