title: How to send a list of selected checkboxes from view to controller
body: <p>I have been trying to work out how I can get the list of selected checkboxes to work using an ActionLink. I think I need to do something clientside with JavaScript but cannot find the relevant code. </p>
  
  <p>The following code works perfectly using a submit button, posting back the selected id's as an array of id's, but I need to have this on a page with other buttons. </p>
  
  <pre><code>// the view 
  @foreach (var station in Stations)
  {
     &lt;input type="checkbox" name="selected" value="@station.StationId" /&gt; 
  }    
  &lt;input type="submit" value="Save" /&gt;
  
  //Controller stub
  public ActionResult Action(string [] selected) 
  </code></pre>
  
  <p>I have been stuck on this for hours, so maybe I am looking at this the wrong way.</p>
  
  <p>PS. My first post after many many hours reading and learning here. </p>