title: Passing multiple Collections of data from View to Controller (ASP.NET MVC 5)
body: <p>In a View i have the next structure ( control of <strong>Subject*<em>s for each </em>*Group</strong>):</p>
  
  <pre><code>    @using (Html.BeginForm())
      {
          @Html.AntiForgeryToken()
          &lt;div class="form-horizontal"&gt;
              @for (int i = 0; i &lt; ViewBag.AllGroups.Count; i++)
              {
                      &lt;h4&gt;@ViewBag.AllGroups[i].Code&lt;/h4&gt;
  
                      &lt;select id="e-@i" multiple="multiple"&gt;
                      @foreach (Subject subject in ViewBag.AllSubjects)
                      {
                          &lt;option value="@subject.Name"&gt;@subject.Name&lt;/option&gt;
                      }
                      &lt;/select&gt;
              }
              &lt;input type="submit" value="Generate" class="btn btn-default" /&gt;
          &lt;/div&gt;
      }
  </code></pre>
  
  <p>The question is that how can I retreive this data (I want to receive <strong>(1)list of Groups</strong> and and I want to get a <strong>(2)list of all selected Subjects for each group</strong> in my list(1)) in my Controller?</p>
  
  <p>Thank you in advance.</p>