I have an Upload File form, the file has (Name nvarchar, FileData varbinary(max))
Name and FileData are mandatory fields
For some reason, validation of FileData (using Required attribute) is not working, so I searched the internet and found an Html Helper extension method which renders a Input(file) and can validate it.
But the problem is that when I add the error to the model state and return View() the returnUrl which was in the query string is gone, how can I persist returnUrl and/or some other query string variables in such case?
You may notice, I can't use RedirectToAction, I have to return View() so that the validation summary can show the error (and hopefully, the Name field persists its value).