升级到.NET 4.5,事件与用户控件的GridView OnRowCommand用的LinkButton不火之后 [英] After upgrading to .NET 4.5, event in UserControl with GridView OnRowCommand with Linkbutton doesn't fire
问题描述
我有一个稳定的应用程序,其中一个功能突然停止工作,从.NET 4升级到.NET 4.5之后。该错误已被隔离到一个事件不触发,它已被证实毫无疑问(2服务器和工作站3),即这个错误只有.NET 4.5升级后,会发生(之前没有发生过)。
I have a stable application where one function suddenly stopped working, after upgrading from .NET 4 to .NET 4.5. The error has been isolated to an event not firing and it has been confirmed beyond any doubt (on 2 servers and 3 workstations), that this error only happens after the .NET 4.5 upgrade (and did not happen before).
我有以下内容:
- 一个空的ASPX只包含一个用户控件(不要问)
- 用户控件包含一个装有一回发后内容的GridView。
- GridView控件中包含一个LinkButton。
- 文字来自一个eval
- 它还具有设置CommandArgument 的OnDataBinding事件
- An empty aspx that only contains a usercontrol (don't ask)
- The user control contains a GridView that is loaded with content after a postback.
- The GridView contains a LinkButton.
- The Text comes from an Eval
- It also has an OnDataBinding event that sets the CommandArgument
在OnRowCommand该事件被触发在.NET 4.0中,不打响了.NET 4.5。
The event in the OnRowCommand is fired in .NET 4.0 and is not fired in .NET 4.5.
任何线索?
更新
我简化我的code和得到更接近问题的核心。我发现它在GridView上引起
AllowCustomPaging =真
。除去在此之后,回发工作正常。I simplified my code and got closer to the core of the problem. I found that it was caused by
AllowCustomPaging="True"
on the GridView. After removing this, the postback works fine.推荐答案
我简化我的code和得到更接近问题的核心。我发现,它是由AllowCustomPaging在GridView上引起=真。除去在此之后,回发工作正常。
I simplified my code and got closer to the core of the problem. I found that it was caused by AllowCustomPaging="True" on the GridView. After removing this, the postback works fine.
这篇关于升级到.NET 4.5,事件与用户控件的GridView OnRowCommand用的LinkButton不火之后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!