I use
modelstate.Adderror("test","test message")
And how can I get this modelstate value in the controller itself.
How do I need to get the error message "test" in the controller.
He asks in the controller, I canโt check this, but I think itโs just something like:
ModelState["test"].Value ModelState["test"].Error ModelState["test"]
One of the above.
Try <%=Html.ValidationMessage("Test") %> .
<%=Html.ValidationMessage("Test") %>