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