Here is the Rounte config:
Although the id parameter is not required in this rounting. I've tried use code bellow and error occurs
- routes.MapRoute(
- name: "Default",
- url: "{controller}/{action}/{id}/{*filePath}",
- defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
- );
Finally, I add a really value to solve it.
- @{Html.RenderAction("ListPart", "Store");}
- @{Html.RenderAction("ListPart", "Store", new { id = UrlParameter.Optional });}
- @{Html.RenderAction("ListPart", "Store", new { id = 0 });}