tags:

views:

19

answers:

1

I have a page that a user selects what he wants to download, the submit button posts the form to

public FileStreamResult GetFiles(FileSelectionModel model)
{
   //zips files into one zip
   return File();
}

However, what if the model wasn't in a valid state? How do I check it? It wouldn't let me return View() or return RedirectToAction() here

thanks

+1  A: 

Change the return type of your action from FileStreamResult to the more generic ActionResult, then you can return View() or RedirectToAction().

HTHs,
Charles

Charlino