asp.net mvc - unable to get all uploaded file in mvc 5 -
i have 2 file upload control different name , id. when uploading multiple file ,i receiving 1 file of each control. below code. main view
@using (ajax.beginform("questionnaire", "tax", new ajaxoptions { insertionmode = insertionmode.replace, updatetargetid = "divquestionnaire" }, new { id = "formquestionnaire", enctype = "multipart/form-data" })) { <div class="clearfix" id="divquestionnaire"> @{ html.renderpartial("_questionnaire");} </div> }
partial view file upload control placed
<input id="photourl" type="file" class="upload" multiple="multiple" name="photourl" /> <input id="addressurl" type="file" class="upload" multiple="multiple" name="addressurl" /> <button type="submit">save</button>
controller
public actionresult questionnaire(httppostedfilebase[] photourl, httppostedfilebase[] addressurl) { }
also tryied not working
public actionresult questionnaire(ienumerable<httppostedfilebase> photourl, ienumerable<httppostedfilebase> addressurl) { }
Comments
Post a Comment