jQuery的-AJAX调用ASP.NET页面的方法。如何返回值给jQuery的? [英] jQuery-AJAX calling ASP.NET page method. How to return value back to jQuery?

查看:84
本文介绍了jQuery的-AJAX调用ASP.NET页面的方法。如何返回值给jQuery的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我使用jQuery AJAX调用特定的ASP.NET页面的方法怎么有一个方法返回一个值回AJAX方法调用它?

If I use jQuery AJAX to call a specific ASP.NET page method how to have that method return a value back to the AJAX method that called it?

更新

我的情况是我与许多现有的方法现有的Web应用程序。我想能够使用jQuery来执行这些方法的一些然后更新的结果的用户界面。我的任务是远离ASP.NET AJAX路程,用jQuery坚持。管理层担心继续开发和支持与微软ASP.NET AJAX。我同意他们。

My situation is I have an existing web application with many existing methods. I would like to be able to use jQuery to execute some of these methods and then update the UI with the results. My mandate is to stay away from ASP.NET AJAX and stick with jQuery. Management is concerned about continued development and support with ASP.NET AJAX from Microsoft. I agree with them.

推荐答案

您可以使用jQuery与页面的方法是这样的:<一href=\"http://encosia.com/2008/05/29/using-jquery-to-directly-call-aspnet-ajax-page-methods/\">http://encosia.com/2008/05/29/using-jquery-to-directly-call-aspnet-ajax-page-methods/

You can use JQuery with page methods this way: http://encosia.com/2008/05/29/using-jquery-to-directly-call-aspnet-ajax-page-methods/

成功的回调包含返回数据的参数。

The success callback contains a parameter with the returning data.

心连心。

这篇关于jQuery的-AJAX调用ASP.NET页面的方法。如何返回值给jQuery的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆