Store <input type="file"/> in model, always getting null.
Hey,
This start to driving me crazy. I'm creating a HTML form where I want to upload files (multiple) through this form with a <input type="file" multiple />. Problem is that the file(s) is never sent to the model so the property always holding null instead of the uploaded file when the form is posted.
Store <input type="file"/> in model, always getting null.
Hey,
This start to driving me crazy. I'm creating a HTML form where I want to upload files (multiple) through this form with a <input type="file" multiple />. Problem is that the file(s) is never sent to the model so the property always holding null instead of the uploaded file when the form is posted.
In my view:
In my model:
Any idea of how to get this to work? Everything works except for this file upload.
What does the input field looks like? Instead of the Html.TextBoxFor helper just try to write it like this:
Jeroen
I actually solved this problem. Files were never posted because I used Ajax.BeginForm to build the form instead of Html.BeginForm.
is working on a reply...