Olivier Muhring

Olivier Muhring

  • NA
  • 150
  • 10k

Create a search box on an mvc 3 list page

Jun 27 2012 10:50 AM
Using the MVC 3 framework I wrote a controller which is used to "manage" a series of tables in a database.

This is done in a pretty straightforward manner: the controller supports Index, Create, Edit, Detail and Delete actions. I'm not using any extra controls, just plain old standard aspx functionality. No jquery, ajax, ...

On the index view I show a listing of what's currently in my database table, I would like to add extra functionality:
  • Add sorting and paging. This isn't necessary for all tables, but some will contain a lot of data.
  • Add a searchbox on top of the page, which should allow the user to search in the listing he has on his screen.

I've already done some research on the 2nd portion of my question, but can't really find a usable example...

The only one I might be able to use rather quickly, uses jQuery to achieve the 2 goals I mentioned, however, I wonder if there is no other way.

Can some here help me? :-) I've added a sample version of one of the controllers I build and its associated views.

Attachment: example.zip

Answers (1)