如何在ASP中做一个AJAX帖子。净MVC2吗?

时间:2020-11-30 03:43:10

hello guys what is the best way to do an AJAX post using ASP.NET MVC?

大家好,使用ASP写AJAX文章的最好方法是什么?净MVC吗?

1 个解决方案

#1


3  

You need code on the client (browser) side to initiate the call, and the easiest way to do this is to use a Javascript library like jQuery which has integrated AJAX/JSON support. You'll find that jQuery is already in your Scripts folder if you have just used the Visual Studio template for an ASP.NET MVC project. Follow the link to the jQuery site and look at its .ajax() and .json() methods for more information.

您需要客户端(浏览器)上的代码来发起调用,最简单的方法是使用Javascript库,如jQuery,它集成了AJAX/JSON支持。如果您刚刚为ASP使用了Visual Studio模板,您会发现jQuery已经在您的脚本文件夹中了。净MVC项目。请遵循jQuery站点的链接,并查看它的.ajax()和.json()方法以获得更多信息。

#1


3  

You need code on the client (browser) side to initiate the call, and the easiest way to do this is to use a Javascript library like jQuery which has integrated AJAX/JSON support. You'll find that jQuery is already in your Scripts folder if you have just used the Visual Studio template for an ASP.NET MVC project. Follow the link to the jQuery site and look at its .ajax() and .json() methods for more information.

您需要客户端(浏览器)上的代码来发起调用,最简单的方法是使用Javascript库,如jQuery,它集成了AJAX/JSON支持。如果您刚刚为ASP使用了Visual Studio模板,您会发现jQuery已经在您的脚本文件夹中了。净MVC项目。请遵循jQuery站点的链接,并查看它的.ajax()和.json()方法以获得更多信息。