A jQuery Autocomplete (with .Net) which actually works

Use JSBeautifier to format JS: $(“[id$=’_txtCountermandedBy’]”).autocomplete({ source: function(request, response) { var param = { qry: $(“[id$=’_txtCountermandedBy’]”).val() }; $.ajax({ type: “POST”, url: “~/../MyWorkBasket.aspx/GetUserAutocomplete”, data: JSON.stringify(param), dataType: “json”, contentType: “application/json; charset=utf-8”, dataFilter: function(data) { return data; }, success: function(data) { response($.map(data.d, function(item) { return { value: item.Value, label: item.Label } })) }, error: function(XMLHttpRequest, textStatus, errorThrown) { […]