Technology Ninja. Loving Father.

Archive for the MVC 3 Category

Get to Know Action Filters in ASP.NET MVC 3 Using HandleError – .net DEvHammer

What’s an Action Filter?

If you’re just getting started with ASP.NET MVC, you may have heard of something called action filters, but haven’t had the chance to use them yet. Action filters provide a convenient mechanism for attaching code to your controllers and/or action methods that implements what are referred to as cross-cutting concerns, that is, functionality that isn’t specific to one particular action method, but rather is something you’d want to re-use across multiple actions.

An action filter is a .NET class that inherits from FilterAttribute or one of its subclasses, usually ActionFilterAttribute, which adds the OnActionExecuting, OnActionExecuted, OnResultExecuting, and OnResultExecuted methods, providing hooks for code to be executed both before and after the action and result are processed.

Because action filters are subclasses of the System.Attribute class (via either FilterAttribute or one of its subclasses), they can be applied to your controllers and action methods using the standard .NET metadata attribute syntax:…

Shout it
Only $4.95/month – Windows 2008/ASP.NET 4 Hosting!

Upload Files In RAZOR With jQuery Uploadify Plugin

A Few months back I wrote a post on how to use jQuery plugin Uploadify to upload single/multiple files without postback in ASP.NET. Now a few days back I was working on a demo project which is on MVC 3 Razor and I use the same plugin without any problems. But the files that are being uploaded are uploaded to the root folder instead of the folder I specified to upload the files. After a lot of head scratching, I was unable to find the actual problem as why the file was not being uploaded to the folder of …
Shout it
Telerik – RadControls for WPF

Free Video Training: ASP.NET MVC 3 Features – Scott Guthrie’s Blog

A few weeks ago I blogged about a great ASP.NET MVC 3 video training course from Pluralsight that was made available for free for 48 hours for people to watch.  The feedback from the people that had a chance to watch it was really fantastic.  We also received feedback from people who really wanted to watch it – but unfortunately weren’t able to within the 48 hour window.
The good news is that we’ve worked with Pluralsight to make the course available for free again until March 18th.  You can watch any o…
Shout it
Telerik – RadControls for WPF