AJAX 2.0 + 是否可用?仍然根据请求发送完整回发
这确实是一个普遍问题。我读过一些地方,可能是微软的白皮书或博客,我真的不确定,因为我现在没有链接。
基本上,该人在使用更新面板时描述了这一点(其中他提到了 AJAX.Net 1.0),尽管您希望只更新/刷新关联的控件和组件,但整个页面都会随请求一起提交更新面板。
显然,当设计是最小化发送到服务器和从服务器发送的流量时,这违背了 AJAX 的目的。在这种情况下,您不妨对该页面进行完整的回发。我想从美观的角度来看,AJAX.Net 按预期实现了这一点,但在幕后并没有实现您所期望的功能。
现在这很可能在以后的版本中得到解决,我只是无法确认这一点。我在谷歌上到处搜索寻找答案。
这个人说的是使用 JQuery,因为这在更新时提供了真正优化的流量,当然它确实如此,所以这就是为什么我问微软在他们的更高版本中是否也做了同样的事情。
我只是想在尝试向微软的某个人询问这个不可能的任务之前先问你很多问题。
我回家后会查找该链接,如果找到,我会将其添加到此处,这样您就不会认为我疯了。 :)
This is a general question really. I had read some where, it may of been an Microsoft whitepaper or blog I am really not sure as I dont have the link right now.
Basically, the person was describing that (of which he referred to AJAX.Net 1.0) when using an update panel, although you would expect only the controls and components associated to be updated/refreshed, the entire page is submitted with the request in the update panel.
Obviously this defeats the purpose of AJAX when the design is to minimize traffic sent to and from the server. In this case you might as well do a full post back for the page. I guess from a cosmetic point of view, AJAX.Net does the trick as intended but behind the scenes doesn't do what you would expect.
Now this could well of been resolved in later versions I just can't confirm this. I have searched Google high and low for an answer.
What the person said was to use JQuery as this offers true optimized traffic flow when updating, which of course it does, so this is why I ask have Microsoft done the same with their later versions.
Just thought I'd ask you lot before attempting the impossible task of asking someone in Microsoft.
I'll have a look for the link when I get home and if I find it I'll add it here just so you don't think I'm off my rocker. :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这篇文章 ASP.Net AJAX 无法正常工作(完整)页面回发)很好地解释了问题和解决方案。
This post ASP.Net AJAX Not Working (Full page postback) explains pretty well about the problem and the solution.