6

I am looking to implement a live search in my MVC app similar to this site when you type in a question and results come up that are similar or like the search on http://www.krop.com/

I have the search code all working and results updated. I just need to know how to add the AJAX to the MVC framework (I know this site was built using it) so that when I type the results are updated.

I had this all working in normal ASP.NET Forms app.

tereško
  • 58,060
  • 25
  • 98
  • 150
ddd
  • 1,399
  • 3
  • 19
  • 44

2 Answers2

5

what you need to do it attach to Jquery onchage event handler, and then call some ajax method of jquery ($.load , $.ajax etc...) and the information from a specified controller. asp.net mvc controller can return json results so you can later manipulate it in your javascript code.

if you have any other questions go ahead and ask.

Orentet
  • 2,353
  • 1
  • 17
  • 28
0

An ASP.NET MVC site will have AJAX and JQuery available by default.

Mike Bosch's Blog can give you some pointers on this

AnthonyWJones
  • 187,081
  • 35
  • 232
  • 306