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

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

Model-View-Controller (MVC) Pattern

Model-View-Controller, or MVC, is a design pattern that is often used in creating web / mobile applications.

Definition of MVC objects

  • Model objects are used to represent the data in your application. If designed appropriately, model objects can be reused in multiple projects. This is especially important in cross-platform scenarios. For model objects to be reusable,  they should not know details about how your views and controllers operate.
  • View objects represent things on screen. For instance, a button or a table view would be view objects.  Primary responsibilities for view objects include drawing themselves on screen and responding to events.  View objects should not have direct access to the model.
  • Controller objects are used to coordinate the models and the views to create the application.  Controllers can fetch data from the model and hook it up to the corresponding views in the application. When data needs updated or saved, the controller can help facilitate this task by leveraging the model.  Controllers are also responsible for handling application flow, e.g.  navigating between screens.

 

Thanks to : codesnack.com

The specified DSN contains an architecture mismatch between the Driver and Application

  • The specified DSN contains an architecture mismatch between the Driver and Application.
  • To resolve this error, use the 32-bit odbcad32.exe (c:\windows\system32\odbcad32.exe) to configure or remove the DSN.
  • To manage a data source that connects to a 32-bit driver under 64-bit platform, use c:\windows\sysWOW64\odbcad32.exe. To manage a data source that connects to a 64-bit driver, use c:\windows\system32\odbcad32.exe.