ASP.NET MVC5 and DataTables

Thanks to Stack Overflow

http://stackoverflow.com/questions/28442960/asp-net-mvc5-and-datatables-for-a-beginner-what-goes-where

http://stackoverflow.com/questions/22546986/mvc-jquery-datatables-unable-to-get-property-classname-of-undefined-or-null-re

In BundleConfig.cs I added the following lines:

        bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                    "~/Scripts/jquery-1.10.2.min.js"));

        bundles.Add(new ScriptBundle("~/bundles/datatables").Include(
                    "~/Scripts/jquery.dataTables.js"));

In _Layout.cshtml I added the following to the head tag:

<link href="~/Content/jquery.dataTables.css" rel="stylesheet" type="text/css"/>
<link href="~/Content/jquery.dataTables_themeroller.css" rel="stylesheet" type="text/css" />
http://~/Scripts/jquery-1.10.2.min.js
http://~/Scripts/jquery.dataTables.js

Finally, at the bottom of Index.cshtml is the call to the script:


    $(document).ready( function () {
        $('#products').DataTable();
    } );
For DataTables to work, the <thead> is compulsory and <tbody> is optional. When you are going to add the <thead> tag, its better to add the <tbody> tag also
Advertisements

IIS 7.5 error: Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list

http://wishmesh.com/2010/08/iis-7-5-error-handler-pagehandlerfactory-integrated-has-a-bad-module-managedpipelinehandler-in-its-module-list/

 

Running the following commands solved this issue:

%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i %windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i

Spring.NET

Spring.NET is an open source application framework that makes building  enterprise .NET applications easier.

http://www.springframework.net/index.html

Spring Social is an extension of the Spring Framework that helps you connect your applications with Software-as-a-Service (SaaS) providers such as Twitter, Facebook, Dropbox, and more! It offers an extensible service provider framework (including support for OAuth1 and OAuth2) that greatly simplifies the process of connecting local user accounts to hosted provider accounts.

Spring.NET Social supports the following runtime environments:

  • .NET 2.0
  • .NET Client Profile 3.5 and 4.0
  • Silverlight 4.0 and 5.0
  • Windows Phone 7.0 and 7.1

Spring.NET Social Home Page
Spring.NET Social Twitter API Support Home Page
Spring.NET Social Dropbox API Support Home Page
Spring.NET Social LinkedIn API Support (pre-release) Home Page