使用Jquery调用函数后面的代码 [英] Calling a code behind function using Jquery
问题描述
亲爱的所有人,
我想在没有回发的情况下填充另一个下拉列表所选索引的下拉列表。
你能告诉我如何使用jquery这样做,好像我使用传统的Ajax来调用同一页面后面的代码,我会必须经历我想避免的page_load事件。
i意味着 -
XMLHTTP。 open(POST,Inbox_Grid.aspx,True);
这将调用Inbox_Grid.aspx后面的代码从页面加载开始。但我不想执行它,
请建议!!
查看这篇文章 - 使用jQuery直接调用ASP.NET AJAX页面方法 [ ^ ]。
我记得在第一次实现你提到的场景时读到这个。这很整洁简单。
网上有很多其他的 - 使用jquery调用asp.net服务器端代码 [ ^ ]
希望这会有所帮助!
非常感谢帮助。它会解决问题。我正在尝试但我没有Jquery的经验。
我在JS中使用以下代码
ddlFrom
=
Dear All,
I want to populate a dropdownlist on the selected index changed of the other dropdownlist without postback.
Could you please tell me how to do that using jquery as if i use traditional Ajax to call the code behind of same page,i will have to go through page_load event also which i want to avoid.
i mean --
XMLHTTP.open("POST", "Inbox_Grid.aspx", True);
This will call the code behind of "Inbox_Grid.aspx" starting from page load.But i dont want to execute that,
Please suggest!!
解决方案 Check out this article - Using jQuery to directly call ASP.NET AJAX page methods[^].
I remember reading this while first implementing the scenario you mentioned. It''s neat and simple.
There are many other on the web - calling asp.net server side code using jquery[^]
Hope this helps!
Ankur,
Thanks alot for the help.Seems it will solve the issue.I am trying but i have no experience of Jquery.
I am using the below code in JS
ddlFrom =
这篇关于使用Jquery调用函数后面的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!