Loading and displaying data in jQuery DataTables

In order to implement the jQuery DataTables plugin, you'll first need to create a new view that will list data inside an HTML table. For this example, you'll create a view that displays a list of customers. The list can be read from any data source, such as a SQL Server database. In this example, a simple List object will be used.

To accomplish this, complete the following steps:

  1. In Visual Studio, add a new controller class called CustomerController.cs to the Controllers folder.
  2. Add a new folder called Models to the root of your project and add a new class called Customer.cs to it.
  3. The Customer class will be used to retrieve a list of sample customer records. The code for the class is as follows:
            ...

Get Bootstrap for ASP.NET MVC - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.