Upload files in ASP.NET MVC with JavaScript and C#.

In an earlier post, I showed you how to implement a file upload using ajax and ASP.NET WebAPI. This works great but it means that you need a separate WebAPI. This is fine if you already have one implemented but it makes no sense to create a separate WebAPI…

Extend the Common.Logging API with Log4Net

In an earlier post I described how the Common.Logging API can help us abstract logging in our application by hiding the implementation details and allowing us to use different logging providers (NLog, Log4Net etc) in a modular, plug-n-play way. In this post, we will examine how to combine Common…

My developer rig and why I use a MacBook Pro as a .NET developer

If you are like me, then you spend most of your day in front of your laptop/desktop and a couple of screens. So it makes sense that you use the best tools available to make your life and work easier. This was my goal when I decided to set…

Processing Payments and with Stripe, JavaScript and C# - PCI compliant

Online payments! We've all used them and some of us may have had the "fortune" implementing them on one website or another. Stripe is the not-so-new kid on the block, since it recencly expanded in many countries, that makes this development task a breeze. If you are using .NET, then…

Upload files to the server using Javascript and MVC WebAPI

The ASP.NET WebAPI is really versatile and powerful and I like to use it as much as I can when I develop for the web. I know that MVC controller methods can also process ajax requests, but I like the separation of concerns. WebAPI for REST calls and MVC…

How to bind an Enum to a DropDownList in ASP.NET MVC

Before ASP.NET MVC 5, the only way to bind an enum to a drop down list in an MVC view you had to roll out your own code. And this was fine. These days, with MVC 5 at your disposal, you can achieve this easily by calling the "oh…