I had a Ajax.BeginForm to do a upload of a file.It´s all right except when I debug my controller the parameter HttpPostedFileBase postedFile is null.
<div class="form-group">
<input type="file" class="form-control" name="postedFile" id="postedFile" />
<input type="submit" value="Import" />
</div>
public JsonResult UploadFile(HttpPostedFileBase postedFile)
My Ajax.BeginForm
@using (Ajax.BeginForm("UploadFile", "Ponto", new AjaxOptions
{
HttpMethod = "POST",
OnSuccess = "OnSuccess",
OnFailure = "OnFailure",
LoadingElementId = "progress"
}, new { enctype = "multipart/form-data" }))
the has the same name on parameter controller.