开发者

ASP.Net MVC Ajax.Beginform giving unexpected results when clicking quickly

开发者 https://www.devze.com 2023-01-29 16:30 出处:网络
I am using ASP.Net MVC ajax.beginform to change the content in a panel, I am also switching some other elements on the page with javascript,

I am using ASP.Net MVC ajax.beginform to change the content in a panel, I am also switching some other elements on the page with javascript,

if I 开发者_如何学Cclick quickly between two of the options the javascript behaves as expected but the ajax does not always return the content related to the last clicked button.

anyone else had this problem and are there any fixes or workarounds?

Cheers.

Mark


That's normal, AJAX is asynchronous meaning that the order you would receive responses from the server is not guaranteed to be the same as you send the requests. You might need to queue the requests. There are some good jquery plugins that allow you to achieve this. But with MS Ajax I doubt.

0

精彩评论

暂无评论...
验证码 换一张
取 消