Real-time search using ASP.NET MVC and AJAX

I am looking for a realistic search in my MVC application similar to this site when you enter a question and the results come similar or similar to the search at http://www.krop.com/

I have a search code that works and the results are updated. I just need to know how to add AJAX to the MVC environment (I know that this site was built using it), so when I enter the results, they are updated.

All this worked for me in a regular ASP.NET Forms application.

+6
ajax asp.net-mvc
source share
2 answers

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

if you have any other questions and ask.

+5
source share

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

Mike Bosch Blog can give you some pointers on this

0
source share

All Articles