Pass a model object while using a upload
- by Dejan.S
I'm trying to pass my model object along with the file I'm uploading but I'm stuck on how I should that should be done. This is the code I use now
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Upload(PageBody pageBody)
{
foreach (string file in Request.Files)
{
var hpf = Request.Files[file] as…