I\'m using the JQuery Form plugin to do a file upload on an ASP.NET MVC application. I\'ve learned that since an iframe is used for file uploads (rather than XMLHttpRequest
As of ASP.NET MVC 2 (and onwards) there is an extension method on the Request.
Request
if (Request.IsAjaxRequest()) { // was an ajax request }
Using a jQuery method such as .load() on a controller method will result in Request.IsAjaxRequest() returning true.
Request.IsAjaxRequest()