I have an AJAX call and I am passing this data:

data: JSON.stringify({ data: holder, customer: customerID }),

holder is an array that looks like this [1, 2, 3, 4]

and customerID is an int


I am trying to pass it to this ASP.NET controller:

public List<CustomerQuestionsClass>
updateCustomersQuestions(List<CustomerQuestionsClass> items, int CustomerID)

and here is my class for CustomerQuestionsClass:

public class CustomerQuestionsClass
    public int CustomerID { get; set; }
    public int QuestionID { get; set; }

When I try to pass this data, I get a 405 error. When I take all the customerID stuff out of my ASP.NET Controller and ajax call the ajax call works, so I must be passing in the CustomerID incorrectly, what am I doing wrong?

Related posts

Recent Viewed