0

If I call RenderAction on action method which view has Html.BeginForm() with no params my form action folows the parent url.

If I add any param (route values, action, etc) , form action attribute is replaced with MyChildContorller's controller name and action.

How to use RenderAction without affecting parent url?

Andrej Kaurin
  • 11,592
  • 13
  • 46
  • 54

1 Answers1

0

Html.BeginForm() simply puts Request.Url.ToString() in the form action parameter. When you use Html.BeginForm("actionName", "controllerName") routing will be used to calculate the url.

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928