可以获取Jquery的Ajax调用的方法回调函数从aspx.cs文件中获取变量值 [英] can Get Method callback function of Jquery's Ajax call fetch a variable value from aspx.cs file

查看:208
本文介绍了可以获取Jquery的Ajax调用的方法回调函数从aspx.cs文件中获取变量值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Jquery的Ajax Get方法调用ajax

i am using a ajax call by Jquery''s Ajax Get method

$.get(Dynamic_page.aspx, { Id: ID, Mode: $(strID)[0].value, XYZ: IsSelected }, function(IsSelected) {});







其中IsSelected是一个Jquery变量,我可以从我的aspx中检索一个值.cs页面来验证在aspx.cs页面中执行了哪些操作并获得适当的值



通过get methord的回调函数????



请帮助



提前感谢




where IsSelected is a Jquery Variable ,can i retrieve a value from my aspx.cs page to get verified which action was performed in aspx.cs page and get appropriate value back

by the callback function of get methord ????

please help

thanks in advance

推荐答案

.get(Dynamic_page.aspx,{Id:ID,Mode:
.get(Dynamic_page.aspx, { Id: ID, Mode:


(strID)[0] .value,XYZ:IsSelected},function(IsSelected){});
(strID)[0].value, XYZ: IsSelected }, function(IsSelected) {});







其中IsSelected是一个Jquery变量,我可以从我的aspx中检索一个值.cs页面来验证在aspx.cs页面中执行了哪些操作并获得适当的值



通过get methord的回调函数????



请帮助



提前感谢




where IsSelected is a Jquery Variable ,can i retrieve a value from my aspx.cs page to get verified which action was performed in aspx.cs page and get appropriate value back

by the callback function of get methord ????

please help

thanks in advance


是的你可以拨打aspx页面,它将调用您的页面加载,您必须将此调用重定向到某个方法,然后该方法应返回结果。



否则第二个选项是:



您可以在aspx.cs文件中创建静态方法从jquery直接调用。

参见这个例子:调用静态函数
Yes you can call aspx page, It will call your page load there you have to redirect this call to certain method and then that method should return the result.

Otherwise 2nd options is:

You can make static method inside the aspx.cs file which can be called directly from jquery.
See this example:calling static function


这篇关于可以获取Jquery的Ajax调用的方法回调函数从aspx.cs文件中获取变量值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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