In my ASP MVC view, I pass the key / value pair back from the controller. Looking at the violinist and viewing in the Chrome debugger, I see that the information is being transferred correctly.
I would like the value key / value pair to be the element that appears in the autocomplete list. When the user selects an item from the list, I would like this key element to be placed in the text box.
Here is the jQuery code from my view
$(function () { $('#DRMCompanyId').autocomplete({ source: '@Url.Action("compSearch", "AgentTransmission")', minLength: 2, select: function (event, ui) { $('#DRMCompanyId').val(ui.item.label); } }); });
One thing that I noticed is that if I add the ui variable to the watch list in the browser debugger, I notice that the label and value are the same. Again, however, I see that the return is a full key / value pair.
The following is a screenshot of the Network / Response console after the search is completed. Some of the data is private, so I darkened it, however you can see that a key / value pair is being returned.

NealR source share