top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Can we display all errors in one go?

+4 votes
768 views
Can we display all errors in one go?
posted Mar 31, 2015 by Muskan

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+3 votes
 
Best answer

Using Validation summary u can achieve.

Example:

  1. Add this line in your view ( <%= Html.ValidationSummary(true)%>)

  2. From controller pass exception to

    catch (Exception ex)
    {
    ModelState.AddModelError("error", ex.Message);
    }

answer May 11, 2015 by Balamurugan Kn
...