<link rel="stylesheet" href="~/Content/themes/base/jquery-ui.css" /> <script src="~/Scripts/jquery-1.12.4.js"></script> <script src="~/Scripts/jquery-ui-1.12.1.js"></script> <script> $(function () { var availableTags = []; $.ajax({ url: "/Home/getDataList", type: "GET", async: false, dataType: 'json', success: function (data) { console.log('data===' + data); for (var i = 0; i < data.length; i++) { availableTags.push(data[i].ProductCode); } } }) $("#tags").autocomplete({ source: availableTags }); }); </script> <div class="ui-widget"> <label for="tags">Tags: </label> <input id="tags"> </div>