asp.net 防止引发事件
我有一个位于页面 (.aspx) 上的控件 (.ascx)。该控件内有一个 asp.net 更新面板,其中包含该控件的所有内容。当控件进行回发时,它会自动引发来自控件的所有事件以及来自其所在页面的所有事件。这导致了严重的性能问题。
有什么方法可以阻止引发驻留在控件所在页面上的事件吗?
谢谢
I have a control (.ascx) that sits on a page (.aspx). Within that control there's a asp.net update panel that encompasses everything for that control. When the control does a post back it automatically raises all the events from the control plus all the events from the page it sits on. This is causing significant performance problems.
Is there any way to stop the events from being raised that reside on the page that the control is sitting on?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查 ScriptManager.IsInAsyncPostBack 属性 。
这是示例代码:
Check the ScriptManager.IsInAsyncPostBack Property.
Here is the sample code: