Using ASP .Net MVC 4 Razor.
On my view page, I have HTML
<div>
<input type="file" id="multiFile" class="multi" name="multiFile" accept="jpg|png|gif|xls|xlsx|doc"/>
</div>
I am using following scripts:
<script src="http://jquery-multifile-plugin.googlecode.com/svn/trunk/jquery.js"
type="text/javascript"></script>
<script src="http://jquery-multifile-plugin.googlecode.com/svn/trunk/jquery.MultiFile.js"
type="text/javascript"></script>
In my conroller, [HTTPPost] method:
[HttpPost]
public ActionResult Index(SampleModel model)
{
if(Request.Files.Count>0)
HttpPostedFileBase uploads = Request.Files[0];
//More codes here with model.............................
}
I am following a codeproject
tutorial for Multiple File Upload . And facing problem with HttpPostedFileBase
. the **Error is : Embedded statement cannot be a declaration or labeled statement.