Hello.

I tried to send javascript - object to Webmethod, but I get error when send arrays.

Here's my JS-code:
Code:
var categoryIDs = $("#" + ddlCategoriesCliendID).multiselect("getChecked").map(function () {
        return parseInt(this.value);
    }).get();
    var tagIDs = $("#" + ddlTagsClientID).multiselect("getChecked").map(function () {
        return parseInt(this.value);
    }).get();
    var authors = $("#" + ddlAuthorsClientID).multiselect("getChecked").map(function () {
        return parseInt(this.value);
    }).get();
    
    var data = {
        SearchText: "text",
        SearchIn: 1,
        CategoriesIDs: categoryIDs,
        TagsIds: tagIDs,
        AuthorID: authors
    };
    
    data = JSON.stringify(data);
    $.ajax({
        url: 'Search.aspx/SearchNewsData',
        data: data,
        dataType: "json",
        type: "POST",
        contentType: "application/json; charset=utf-8",
        success: function (result, status) {
            CreateGrid(result);
        }
    });
But when tried to send in the server I saw "Error 500". I tried with different parameters, but without success. Can you help me, which types should be parameters in C# - WebMethod?
I tried with these:
Code:
[WebMethod]
        protected static void SearchNewsData(string SearchText, string SearchIn, string[] CategoriesIDs, string[] TagsIds, string[] AuthorID)
        {

        }

        [WebMethod]
        protected static void SearchNewsData(string SearchText, string SearchIn, int[] CategoriesIDs, int[] TagsIds, int[] AuthorID)
        {

        }
        [WebMethod]
        protected static void SearchNewsData(string SearchText, string SearchIn, List<string> CategoriesIDs, List<string> TagsIds, List<string> AuthorID)
        {

        }
        [WebMethod]
        protected static void SearchNewsData(string SearchText, string SearchIn, List<int> CategoriesIDs, List<int> TagsIds, List<int> AuthorID)
        {

        }
        [WebMethod]
        protected static void SearchNewsData(string SearchText, int SearchIn, string[] CategoriesIDs, string[] TagsIds, string[] AuthorID)
        {

        }

        [WebMethod]
        protected static void SearchNewsData(string SearchText, int SearchIn, int[] CategoriesIDs, int[] TagsIds, int[] AuthorID)
        {

        }
        [WebMethod]
        protected static void SearchNewsData(string SearchText, int SearchIn, List<string> CategoriesIDs, List<string> TagsIds, List<string> AuthorID)
        {

        }
        [WebMethod]
        protected static void SearchNewsData(string SearchText, int SearchIn, List<int> CategoriesIDs, List<int> TagsIds, List<int> AuthorID)
        {

        }
        [WebMethod]
        protected static void SearchNewsData(string SearchText, int SearchIn, object[] CategoriesIDs, object[] TagsIds, object[] AuthorID)
        {

        }

        [WebMethod]
        protected static void SearchNewsData(string SearchText, int SearchIn, List<object> CategoriesIDs, List<object> TagsIds, List<object> AuthorID)
        {

        }
But without success.

Thanks.