Follow Below steps to create the jquery bundle in your project:

Step 1: Create The Blank MVC application.

Step 2: Install JQuery UI package in package manager console,

install

Or Follow this link.

Step 3: Add JQuery buddle in your project using below step,

Step 4: Add Text Box in to your page,

  1. Auto Complete Text Box : <input type="text" id="AutoComplete" />
Step 5: In script Tag add below code , Mention controller and action,
  1. <script>
  2. $(document).ready(function()
  3. {
  4. $('#AutoComplete').autocomplete(
  5. {
  6. source: '@Url.Action("GetAutoComplete", "AutoComplete")'
  7. });
  8. })
  9. </script>
Step 6: Add the action as below , It should return the JSON , I have used hard coded values you may use dynamic values,
  1. public ActionResult GetAutoComplete(string term)
  2. {
  3. if (string.IsNullOrWhiteSpace(term))
  4. {
  5. term = "";
  6. }
  7. string[] AutoCompleteOptions =
  8. {
  9. "AJAY",
  10. "AARAV",
  11. "VIJAY",
  12. "BHUPEN",
  13. "DHANANJAY",
  14. "Balashankar",
  15. "Chandan",
  16. "Daman",
  17. "Devguru",
  18. "Eshwar",
  19. "Falak",
  20. "Ganaraj",
  21. "Hemendra",
  22. "Ishrit",
  23. "Jagannath",
  24. "Kalan"
  25. };
  26. return this.Json(AutoCompleteOptions.Where(t => t.StartsWith(term, StringComparison.InvariantCultureIgnoreCase)),
  27. JsonRequestBehavior.AllowGet);
  28. }
Step 7: Run the project type text,

run