在ASP.NET MVC3使用剃刀文件上传控件 [英] File Upload Controls using Razor in ASP.NET MVC3
本文介绍了在ASP.NET MVC3使用剃刀文件上传控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法来定义ASP.NET MVC3用剃刀帮手文件上传控件?
Is there a way to define the file upload controls using a Razor helper in ASP.NET MVC3?
推荐答案
有没有文件输入的HTML帮手,但什么是错的只是做
There isn't an html helper for file inputs, but what is wrong with just doing
@using (Html.BeginForm("Action", "Controller", FormMethod.Post, new {enctype = "multipart/form-data"})) {
<input type='file' name='blah' id='blah' />
}
这篇关于在ASP.NET MVC3使用剃刀文件上传控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文