jQuery - Url.Action LOCAL Machine Pathing Issue

后端 未结 1 1449
梦谈多话
梦谈多话 2021-01-26 07:57

Why would only my local machine require me to have the following:

$.post(\'@Url.Action(\"ControllerName/ActionName\")\', { param: valueHere }, function (result)          


        
相关标签:
1条回答
  • 2021-01-26 08:41

    Use:

    @Url.Action("actionName", "controllerName")
    

    The issue is probably caused by a discrepancy in the controller name so it is better to be more specific.

    0 讨论(0)
提交回复
热议问题