I want to upload multiple files including Word Documents, Pdf and Images. I need to use a single input for files because we don\'t know how many files will be uploaded.
I order to upload files, your form needs to include the enctype= multipart/form-data
attribute.
<form name="registration" action="" enctype= "multipart/form-data">
or better
@using (Html.BeginForm(actionName, controllerName, FormMethod.Post, new { enctype= "multipart/form-data" }))
and I strongly recommend you pass a model to the view and use the strongly typed HtmlHelper
methods to create your html for the properties of your model.