asp.net mvc 3 - MVC3 pass exception from controller to view -
want print exception on cshtml page, unbale use this
@html.validationsummary() <form method="post" action="adduser"> </form>
you should add error message in action this.
modelstate.addmodelerror(string.empty, "error message.");
and use @html.validationsummary() in view.
Comments
Post a Comment