ASP.Net 按钮单击事件未触发 [英] ASP.Net button click event not firing

查看:35
本文介绍了ASP.Net 按钮单击事件未触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能与这个问题有关,但我有更多的信息.

This is perhaps related to this question, but I have slightly more information.

在使用 Linq 编写了一些新代码后,我最近将一个 ASP.Net 应用程序更新到了 .NET 3.5.现在我的页面间歇性地停止触发事件处理程序.我将它缩小到带有 Ajax 的页面,我认为是 ScriptManager 或 AjaxControlToolkit 注册导致了问题.

I recently updated an ASP.Net application to .NET 3.5 after coding a few new pieces with Linq. Now my pages intermittently stop firing event handlers. I have it narrowed down to pages with Ajax on them, and I assume it's either the ScriptManager or the AjaxControlToolkit registration that is precipitating the problem.

真正棘手的部分是页面似乎在大约 2/3 秒的时间内工作正常,而控件仅在 1/3 的时间内丢失其事件处理程序.我想知道发生了某种类型的错误并且页面无法正确呈现,但我找不到这方面的证据.

The really screwy part is that pages seem to work fine about 2/3s of the time, and the controls lose their event handlers only 1/3 of the time. I wondered about some type of error occurring and the page not rendering correctly, but I cannot find evidence of this.

推荐答案

我们确实遇到了这个问题,正如您所说,它仅在某些时间发生,并且仅在具有 Ajax 请求的页面上发生.我们发现按照对为什么 Internet Explorer 在失败后不会在 Ajax 调用上发送 HTTP 帖子正文? 有效.

We were have exactly this issue and as you have said it was only happening some of the time and only on pages with Ajax requests. We found that disabling the HTTP Keep-Alive as suggested in the answer to Why does Internet Explorer not send HTTP post body on Ajax call after failure? worked.

这可以在 IIS7 中按照 如何在IIS 7中配置HTTP KEEP-ALIVE

This can be done in IIS7 by following the instructions in How to configure HTTP KEEP-ALIVE in IIS 7

这篇关于ASP.Net 按钮单击事件未触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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