MVC Call new Action and View from Javascript and send Array
<p>I currently have an IEnumerable view in a grid which I have added check boxes, to allow me to select items (which I grab the id's via JavaScript and build an array of just the id's).</p>

<p>I have a button which should send the array to a new action and load the corresponding view.</p>

<p>I attempted at first to send the array via a JSON object which worked, but I could not get the controller to load a new view, it just returns the results to the current view (not what I am wanting).</p>

<p>So I am now just trying the following :</p>

<pre><code>window.location.href = '/TeamSelector/TeamList?array=' +SwimmerList;
</code></pre>

<p>This is working but the object is not being sent correctly as I receive nothing in the array at the controller end.</p>

<pre><code>    public ActionResult TeamList (List&lt;int&gt; Array)
    {
    // Do something here
    return view(results)
    }
</code></pre>

<p>Could somebody please advise me on how to structure the JavaScript code to send the array so that it will be accepted by the controller.</p>

<p>Any suggestion/advice would be greatly appreciated.</p>

<p>Andy.</p>