简体   繁体   English

在asp.net中触发sqldependency onchange触发,但asp.net控件未刷新

[英]sqldependency onchange firing in asp.net but asp.net Controls are not refreshing

sqldependency onchange成功在asp.net中触发,我能够在Dataset中获取更新的数据,但是当它将DataSet绑定到Gridview时,它不会刷新自身。此外,当SqlDependency事件触发时,不会触发asp.net页面生命周期事件。

In the onchange event handler, you should be writing code to refresh the page or datagrid. 在onchange事件处理程序中,您应该编写代码以刷新页面或数据网格。 It will not happen on its own. 它不会自行发生。 With SQL dependency, we are just mentioning a callback and that gets executed. 对于SQL依赖关系,我们只提到一个回调并被执行。 Other than that, no event on asp side has fired to call page life cycle event handlers. 除此之外,asp端没有任何事件被触发来调用页面生命周期事件处理程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM