ASP.Net按钮的Click事件不触发 [英] ASP.Net button click event not firing

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

问题描述

这也许是与<一href="http://stackoverflow.com/questions/705743/control-events-not-firing-after-asp-net-3-5-conversion">this问题,但我有稍微的更多信息。

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

我最近更新的ASP.Net应用程序到.NET 3.5的编码了一些新的作品使用LINQ之后。现在,我的网页间歇性地停止射击的事件处理程序。我把它缩小到他们与阿贾克斯的页面,我认为它要么使用ScriptManager或注册AjaxControlToolkit中是precipitating问题。

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请求的页面。我们发现,禁用HTTP保持活动作为答复建议 <一href="http://stackoverflow.com/questions/4796305/why-does-internet-explorer-not-send-http-post-body-on-ajax-call-after-failure/4856707#4856707">Why并失败后的Internet Explorer无法发送HTTP POST正文在Ajax调用?的工作。

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通过执行<一个指令来完成href="http://msmvps.com/blogs/bernard/archive/2007/07/10/how-to-configure-http-keep-alive-in-iis-7.aspx"相对=nofollow称号=如何配置HTTP保持活动在IIS 7>如何配置HTTP保持活动在IIS 7

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

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

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