Asp.net mvc 4 Controller only recognises first selected option

Asp.net mvc 4 Controller only recognises first selected option,asp.net-mvc-4,Asp.net Mvc 4,I am passing a multiple selected item list from my view to the controller via a submitted form, but when I declare it as a string paramenter in my controller actionlink, it only ever gives me the first selected value, I was hoping for a list of the selected items. What should the parameter be in my controller actionlink? Please see code below. Thanks for your help as always. View <select name="listoflocations" class="selectlist" multiple /> foreach (var results in Model) {

I am passing a multiple selected item list from my view to the controller via a submitted form, but when I declare it as a string paramenter in my controller actionlink, it only ever gives me the first selected value, I was hoping for a list of the selected items. What should the parameter be in my controller actionlink? Please see code below. Thanks for your help as always.

View

<select name="listoflocations" class="selectlist" multiple />
    foreach (var results in Model)
    {
        <option name="locnumber" value="@results.LOCNUMBER">@results.CLIENTNAME | @results.LPOSTCODE.ToUpper()</option>
    }

CONTROLLER

public ActionResult Complete(string listoflocations)

#1

You could use a list as parameter in your action:

public ActionResult Complete(IList<string> listoflocations)
{
    ...
}