Monthly Archives: May 2011

Monthly Archives: May 2011

How to register and get all instances that implement an interface using Autofac

Posted on by Joe in C# | 2 Comments

I’ve just started using Autofac, where I’ve previously used Ninject and StructureMap. UPDATE (09/06/2001): Although this post is about registering all instances that implement a specific interface, my reason for doing so was to create a bootstrapper task. I’ve recently found AutoFac has an IStartable interface which basically does the same thing. I have an interface called IBootStrapperTask that looks like this: I then have several tasks that implement this interface, which I want to get and run when my …

ASP.NET MVC simple server-side ajax paging using jQuery

Posted on by Joe in Ajax, ASP.NET, C#, jQuery, MVC | 24 Comments

It’s always important to page your data on the server side so that you are only hitting the database to get the page you currently need, rather than getting all the results and paging on the client. In this post I’ll explain how to perform simple ajax paging on the server side using ASP.NET MVC 3.