I want to display the entire autocomplete list on click of a button. I have tried the below code but it is not working.
 $("#<%= btnCompanyList.ClientID%>").live('click', function (e) {
        alert("hi");
        $("#txtDefaultCompany").autocomplete({
                    source: function (request, response) {
                        $.ajax({
                            url: "AutoComplete.asmx/GetCompanyname",
                            data: "{'prefixText':" + JSON.stringify(request.term) + "}",
                            dataType: "json",
                            type: "POST",
                            contentType: "application/json; charset=utf-8",
                            dataFilter: function (data) { return data; },
                            success: function (data) {
                                alert(data.d);
                                response($.map(data.d, function (item) {
                                    return {
                                        label: item.company_name,
                                        value: item.company_branch
                                    }
                                }))
                            }
                        });
                    },
                    minLength:0
                });
    });
On button click the textbox might be empty. But i want to display the entire list. Any ideas or suggestions please.
Thanks,
 
     
     
    