문제

I am trying to implement jquery tag it plugin version v2.0 in my .net application. Auto Complete shows only single character like "C" the number of type it repeats in all strings.Here is the code i am using for it. Please Suggest how to fix it?

 $(function () {
        $('[id$=txthobbies]').keyup(function () {
            $.ajax({
                type: "POST",
                url: "EditProfile.aspx/GetHobbies",
                data: "{SearchStr:'" + $('[id$=txthobbies]').val() + "'}",
                dataType: 'json',
                async: false,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                   $('[id$=txthobbies]').tagit({
                       availableTags: data.d,
                        select: true,
                        sortable: true,
                       triggerKeys: ['enter', 'comma', 'tab']
                    });
                }
            });

        });
    });
도움이 되었습니까?

해결책

After doing a lot of work finally solved the problem.i am trying to pass array of objects plugin accepts JSON string only.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top