从更新面板更新更新面板外的 gridview

Updating gridview outside the update panel from update panel

我在弹出窗口上有一个网格视图,这个弹出窗口不是更新面板的一部分。 但是显示此弹出窗口的按钮位于 upadtepanel 内。

现在的问题是网格没有反映在 gridview 中所做的更改。

当我删除更新面板时,网格视图更新正常。

无法从面板外部更新任何内容,但您可以触发面板从代码隐藏更新。检查此解决方案:

Refresh an Update Panel on buttonclick

你不能。因为您要更新的任何部分都必须在 UpdatePanel.

UpdatePanel controls work by specifying regions of a page that can be updated without refreshing the whole page.

来自 MSDN