I'm having file browse button like the following,most of the validation are done in the UI with the model annotation but some of them are done in the action (in the controller).
In this case when I go to the controller and do the validation for example and send the error to the page, In the UI you see message that no file chosen(I guess it because it calling to the following code for second time),How should I avoid that ?
Thanks,
<div class="form-group">
@Html.LabelFor(model => model.Sat, new { @class = "control-label col-md-2" })
<div class="col-md-10">
<input type="file" name=@SConstants.SAFile />
@Html.ValidationMessageFor(model => model.Sa)
</div>
</div>