ASP.NET MVC and JQuery get info to controller

前端 未结 7 1414
轻奢々
轻奢々 2020-12-28 23:51

I am totally confused on how to do ajax stuffs with jQuery and it seems the more I try the more confused I get. At this point all I want to do is get data to my controller

7条回答
  •  醉酒成梦
    2020-12-29 00:05

    Have you tried writing out the full URL? I had a project running on my local IIS that had the same problem. The full url was http://localhost/myproject/user/addlink, but using "/user/addlink" in the jQuery ajax call was submitting to http://localhost/user/addlink (notice that "myproject" is missing because it's not actually the base url as far as jQuery knows).

提交回复
热议问题