function SearchText() { $("#txtsearchcourse").autocomplete({ source: function (request, response) { $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: '<%=CallingPage %>' + ".aspx/GetAutoCompleteData", data: "{'strSearchString':'" + document.getElementById('txtsearchcourse').value + "'}", dataType: "json", success: function (data) { response($.map(data.d, function (item) { return { label: item.split('##')[0], val: item.split('##')[1] } })); }, error: function (result) { alert("Error"); } }); }, select: function (event, ui) { document.getElementById('hdnSelectedCourseId').value = ui.item.val; document.getElementById('txtsearchcourse').value = ui.item.label; document.getElementById('lnkSearchCourse').click(); } });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)