Click here to Skip to main content
15,886,776 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<pre>
<form action="Home/upload" method="post" enctype="multipart/form-data">
<label for="photo">Photo:</label>
<input type="file" name="[0].files" id="files_0" />
<input type="file" name="[1].files" id="files_1" />
<input type="file" name="[2].files" id="files_2" />
<input type="submit" value="Upload" />
</form>
</pre>
[HttpPost]
public ActionResult Upload(IEnumerable<HttpPostedFileBase> files)
{
foreach(var file in files)
{
file.SaveAs(...);
}
return RedirectToAction("Index");
}


here files I am getting null I am not getting any files(images)
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900