Dustin Horne

Developing for fun...

Simple Asset Manager for MVC

Lately I've been using a lot of jQuery and other custom javascript in my projects.  I like to use external CDNs when possible to load my script files.  In particular, I like to use the asp.net CDN for use with jQuery.  For much of this work I can simply put my script references in the layout pages, however there are times when I want specific scripts for specific pages.  There are also times when I want to be able to upgrade a script to a newer version.  This may require modifying multiple views.  Additionally, it would require modifying my HTML/Razor for at least my layout view and re-uploading it to the server. More...

AJAX File Uploads with jQuery and MVC 3

Recently I was working on a project that required upload of images.  I wanted to upload the images AJAX style without refreshing the page and thought jQuery would be a good fit.  Using jQuery to post standard forms is extremely simple, but when posting multi-part forms for uploading files it's not so intuitive.  This is due to browser security restrictions and sandboxing.  Today I'm going to show you how to fake an asynchronous upload without reloading the page and get a result back from the server. More...