0

I have 2 Partial views in my ParentView and I am loading partial views like this:

Html.RenderAction("Action1WithChildView1")
Html.RenderAction("Action2WithChildView2")

Each child views has own Form and Submit button.

if child1 submitted to an 
    public RedirectToRouteResult Child1ActionPost() {
    Check for model state and add some model errors,Then
    RedirectToAction(ParentActionReturingMainview);
    }

if child2 submitted to an 
    public RedirectToRouteResult Child2ActionPost() {
    Check for model state and add some model errors,Then
    RedirectToAction(ParentActionReturingMainview);
    }

I have a Validation Summary in each child View, but it is not displaying Model Errors associated with the child views.

Esoteric Screen Name
  • 6,082
  • 4
  • 29
  • 38
  • http://stackoverflow.com/questions/4642845/asp-net-mvc-how-to-preserve-modelstate-errors-across-redirecttoaction check this ,might help – Nitin Varpe Aug 19 '13 at 13:17
  • No,My ParentView has seperate model and also ChildView called from Parent View using RenderAction.So it will not maintain/passs model state to child action. – SureshRajamani Aug 19 '13 at 14:41

0 Answers0