Change the Action method parameter from
string
to
string[]
since the
$('#country').val()
will return a
javascript
array.
public ActionResult GetStates(string[] CountryId)
and add
traditional
property in the ajax method
traditional: true,
traditional
property is used to serialise the array object to pass to the controller, it can be done using
jQuery.param() [
^] also. either ways it will work..