ASP.NET MVC Url.Action in JQuery is not recognized

后端 未结 4 746
无人及你
无人及你 2020-12-06 11:03

I am trying to use Url.Action() method in my js file to define urls for my ajax calls. So far I have failed.

 $.ajax(
 {
    type: \"POST\",
    url: \'@Url.         


        
4条回答
  •  一向
    一向 (楼主)
    2020-12-06 11:36

    you can write it like this way just

    url:'/controllername/Actionname',
    

提交回复
热议问题