Quote:
public class BuSSeatDetail
{
public int SeatID { get; set; }
public int SeatNo { get; set; }
}
Your model accepts a single integer called
SeatNo
.
Quote:
var SeatNo = [], item;
$.each($('#place li.' + settings.selectingSeatCss + ' a'), function (index, value) {
item = $(this).attr('title');
SeatNo.push(item);
});
$.ajax({
type: "POST",
url: "/Bus/Index",
data: JSON.stringify(SeatNo),
Your Javascript is posting
an array of values to the controller.
We can't see the code that populates the
place
list. But even assuming that the title of every
<li>
in that list is a number, you cannot store an array of numbers in a single number.
You need to change your client-side code so that it posts data in the format expected by the server. Or change your server-side code so that it accepts data in the format sent by the client.