var postData = { values: array};
$.ajax({
type: "POST",
url: "/Home/Gen",
data: postData,
success: function (data) {
alert(data.Result);
},
dataType: "json",
traditional: true
});
public JsonResult Gen(List<String> values)
{
return Json(new { Result = String.Format("Fist item in list: '{0}'", values[0]) });
}