 <p>This is a specification. </p> <p><a href="http://www.hanselman.com/blog/ASPNETMVCBetaReleasedCoolnessEnsues.aspx" rel="nofollow noreferrer" title="Scott Hanselman&#39;s Computer Zen - ASP.NET MVC Beta released - Coolness Ensues">Scott Hanselman's Computer Zen - ASP.NET MVC Beta released - Coolness Ensues</a></p> <p>This is V1 RTW base model binder sample code.</p> <p>1.Make custom model binder.</p> <pre><code>using System.Web.Mvc; namespace Web { public class HttpPostedFileBaseModelBinder : IModelBinder { public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) { var bind = new PostedFileModel(); var bindKey = (string.IsNullOrEmpty(bindingContext.ModelName) ? "" : bindingContext.ModelName + ".") + "PostedFile"; bind.PostedFile = controllerContext.HttpContext.Request.Files[bindKey]; return bind; } } } </code></pre> <p>2.Create model class.</p> <pre><code>using System.Web; namespace Web { public class PostedFileModel { public HttpPostedFileBase PostedFile { get; set; } } } </code></pre> <p>3.Entry model binder in global.asax.cs.</p> <pre><code>protected void Application_Start() { RegisterRoutes(RouteTable.Routes); ModelBinders.Binders[typeof(PostedFileModel)] = new HttpPostedFileBaseModelBinder(); } </code></pre>