How to keep input type=file field value after failed validation in ASP.NET MVC?

前端 未结 7 1671
闹比i
闹比i 2020-11-27 04:39

I\'ve got a simple form in an MVC app I\'ve made. It contains a file field so users can upload an image. It all works great.

Problem is, if the form submit fails val

相关标签:
7条回答
  • 2020-11-27 05:04

    If the file isn't too big you could base64 it and use this as value for a hidden field.

    0 讨论(0)
提交回复
热议问题