Мой взгляд:
using (Ajax.BeginForm("Create", "CustomerEngagement", null, new AjaxOptions { OnSuccess = "closePopUpAndShowNextPost", InsertionMode = InsertionMode.Replace, HttpMethod = "post" }, new { @id = "create" }))
{
// Lots of things going on here
// I need to implement fileupload to upload attachments asynchronously here
<input name="fileupload1" id="fileupload1" multiple type="file" />
<button id="fileupload" name = "upload">
//Button to submit the form
<button id="save" value="save">
}
Контроллер:
[HttpPost]
public ActionResult Create(string word, StudentModel model)
{
List<string> synonyms = new List<string>();
List<string> sugg = new List<string>();
//Doing lot of stuff here
// I'm trying to get httppostedfilebase here but its null, also request.Files[] coming null.
}
Я думаю, что в ajax.beginform
файл не загружен, может у нас есть какое-то другое решение?
new { enctype = "multipart/form-data" }
html - person   schedule 15.06.2015