The data on my page is such:
var userIdCol = '3,67,78,37,87';
This collection of used Id's is obtained from a Listbox via jQuery on my page.
All I want to do is post this list of UserId's to my controller and display a success message somehere on my page. "Users have been updated."
I am not sure what the signature of my controller should look like and how I should compose the jQuery when I want to pass a list like the one above?
Also, I am wondering if I really need the Controller action has to be an ActionResult?
In the past I have done other posts like so:
$.ajax({
type: "POST",
url: "/Issue/" + "Index",
dataType: "html",
data: {
//page: 5
projectId: $("#ProjectList").val()
},
success: function(v) {
RefreshComment(v);
},
error: function(v, x, w) {
//Error
}
});
public ActionResult Index(int? page, int? projectId)
{
//
return View();
}