Created
June 3, 2013 16:30
-
-
Save iamandycohen/5699393 to your computer and use it in GitHub Desktop.
FileUploadFor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MvcInputExtensions = System.Web.Mvc.Html.InputExtensions; | |
public static class InputExtensions | |
{ | |
public static MvcHtmlString FileUploadFor<TModel, TProperty>(this HtmlHelper<TModel> html, Expression<Func<TModel, TProperty>> expression) | |
{ | |
return MvcInputExtensions.TextBoxFor<TModel, TProperty>(html, expression, htmlAttributes: new { type = "file" }); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment