In my previous blog post I wrote a step-by-step guide on how we can create a NuGet Package using Visual Studio. This one explains how to create a Nuget Server that can then be used as an additional Package source in NuGet. This repository will contain only the packages that you add and is often […]
ASP.NET
jQuery DataTables – Async and Responsive
I have used jQuery Datatables in a few MVC projects with Bootstrap and find it pretty easy to integrate. It allows data to loaded via ajax and can be made responsive. It has inbuilt UI features for sorting, pagination and search features. Here is an easy implementation sample.
Configuration based Unity IOC for Dependency Injection
I have always maintained that having an IOC for DI makes only half sense if we are still registering the types in the code. The exception is when you have dynamic parameters passed into constructors of the classes being constructed by the Dependency Injection. Here is what I mean for example instead of doing […]
HttpHandler to handle image uploads at server
The following module is useful to handle image uploads at the server especially when not using the default upload controls. It can be affectively used for hanlding ajax image uploads. The following handler returns Html content(true or false) based on the result of the upload. public class Upload : IHttpHandler { public void ProcessRequest(HttpContext […]
Dynamic resizing of Images
Front end users are free to upload images of any size, However for uniformity its often necessary to resize these images to a standard width and height but still maintaining the aspect ratio. The following function is what I use to to resize an image dynamically. The file thus returned can then be renamed and […]
Avoid Redirect to Login Page
When the following authorization is set in the config file at the site’s root, inside the system.web node, we notice that no object is rendered unless the user gets authenticated. This also includes images, style sheets, javascripts etc. <authorization> <deny users="?" /> <allow users="*" /> </authorization> In cases like these, we […]