In this article you will learn about Datatables Jquery plugin Server Side Integration using ASP.NET Webform.
Datatables is a quite popular JQuery based plugin. There are a lot of flavors of Datatables plugins and it supports many major web programming technologies. In this article, I shall be focusing more on how Datatables plugin can be integrated with classic ASP.NET webform server side. If anyone is interested to integrate this beautiful plugin with ASP.NET MVC5 server then here is the link. Following are some prerequisites before you proceed any further in this tutorial, Prerequisites:
You can download the complete source code for this tutorial from here or you can follow the step by step discussion below. The sample code is developed in Microsoft Visual Studio 2015 Enterprise. I am using SalesOrderDetail table extract from Adventure Works Sample Database. Let's begin now.
In above piece of code, we have created a WebMethod which is based on searching, sorting and pagination information sent from Datatebles plugin, following have been done i.e.
"GetData" function will be executed each time the table is being searched, sorted or new page is accessed. Here are the following two lines which are important,
Getting Started with ASP.NET 4.5 Web Forms and Visual Studio 2013