Вопрос

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