質問

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