Advertisement
Guest User

Untitled

a guest
May 23rd, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. document.ready(function () {
  2.     $('#Title').autocomplete({
  3.         source: function (request, response) {
  4.             $ajax({
  5.                 url: "/Course/Create",
  6.                 type: "POST",
  7.                 dataType: "json",
  8.                 data: { Prefix: request.term },
  9.                 success: function (data) {
  10.                     response($.map(data, function (item) {
  11.                         return { label: item.Title, vlaue: item.Title };
  12.                     }))
  13.                 }
  14.             })
  15.         },
  16.         messages: {
  17.             noResult: "", results: ""
  18.         }
  19.     });
  20. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement