从asp.net Ajax应用程序对asmx/js进行多次调用 [英] Multiple calls made to asmx/js from asp.net Ajax application
问题描述
我正在研究一个ASP.NET3.5和Ajax应用程序的性能优化.有一个调用服务的Ajax级联下拉列表-CityListProvider.asmx.在Fiddler工具捕获请求/响应的同时运行该应用程序时,我看到对URL进行了多次调用-CityListProvider.asmx/js.
我知道可以调用CityListProvider.asmx/js来创建ajax客户端代理,但是为什么要多次调用来创建代理.它不会每隔一次改变吗?我肯定我在这里缺少什么..有人可以为此提供一些指导吗.
谢谢,
Ramesh
Hi,
I am working on performance tuning of one ASP.NET3.5 and Ajax application. There is a Ajax cascading dropdown list that calls the service - CityListProvider.asmx. When I run the application while the Fiddler tool is capturing the requests/responses, I see that there are multiple calls made for the URL - CityListProvider.asmx/js.
I understand that CityListProvider.asmx/js is called to create the ajax client proxy, but why should there be multiple calls to create the proxy. It''s not going to change every other time right? I am sure I am missing something here .. could someone please provide some direction on this.
Thanks,
Ramesh
推荐答案
不看代码很难说.基本上,只有在发生触发您呼叫的事件(例如选择更改)时,您才应该看到对.asmx的呼叫.
查看此CascadingDropDown页面 [
It is very hard to say with out looking at the code. Basically you should only see a call to your .asmx when there is an event that triggers a call to you, like selection changes.
Look at this CascadingDropDown page[^] I run it and noticed on Fiddler that the call the respective .asmx was done only when I changed a value in the drop down menu. Compare your page with that and see what is different, may be that will give you a hint.
这篇关于从asp.net Ajax应用程序对asmx/js进行多次调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!