ddd
ddd

Reputation: 1399

Live Search using ASP.NET MVC and AJAX

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.

Upvotes: 6

Views: 6485

Answers (2)

Orentet
Orentet

Reputation: 2363

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.

Upvotes: 5

AnthonyWJones
AnthonyWJones

Reputation: 189457

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

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

Upvotes: 0

Related Questions