刷新更新面板

发布于 2024-08-07 21:05:44 字数 104 浏览 2 评论 0原文

我也有母版页更新面板。当我的子页面有删除功能时。 当我从网格中删除该行时。在我重新绑定网格之后。然后我也看不到刷新的网格。

如何更新面板或网格?

问候 丹拉吉·S

i have master page update panel also. When i child page have delete function.
when i delete the row from grid. after i rebind the grid. Then also i cannot see refreshed grid.

how to update the panel or grid?

regards
Dhanraj.S

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

双马尾 2024-08-14 21:05:44

尝试以下操作:

ctype(me.Page.Master.FindControl("UpdatePanel1"),UpdatePanel).Update()

try the following:

ctype(me.Page.Master.FindControl("UpdatePanel1"),UpdatePanel).Update()

小情绪 2024-08-14 21:05:44

像这样设置 UpdatePanel:

  <asp:UpdatePanel ID="UpdatePanel1" runat="server"
        ChildrenAsTriggers="True"  UpdateMode="Always">
      <ContentTemplate>
                       ...
      </ContentTemplate>
  </asp:UpdatePanel>

注意:当 GridView 和 DetailsView 控件的 EnableSortingAndPagingCallbacks 属性设置为 true 时,它​​们与 UpdatePanel 不兼容。默认为 false。

在母版页中使用 UpdatePanel 控件

UpdateMode 属性

UpdatePanel 控件的内容更新为在以下情况下:

  • 如果 UpdateMode 属性设置为 Always,则 UpdatePanel 控件的内容将在每次源自页面上任何位置的回发时更新。这包括来自其他 UpdatePanel 控件内部的控件的异步回发以及来自不在 UpdatePanel 控件内部的控件的回发。
  • 如果 UpdatePanel 控件嵌套在另一个 UpdatePanel 控件内,并且父更新面板被更新。
  • 如果 UpdateMode 属性设置为 Conditional,并且出现以下条件之一:
    • 显式调用 UpdatePanel 控件的 Update 方法。
    • 回发是由使用 UpdatePanel 控件的 Triggers 属性定义为触发器的控件引起的。在这种情况下,控件显式触发面板内容的更新。该控件可以位于定义触发器的 UpdatePanel 控件内部或外部。
    • ChildrenAsTriggers 属性设置为 true,并且 UpdatePanel 控件的子控件会导致回发。嵌套 UpdatePanel 控件的子控件不会导致外部 UpdatePanel 控件的更新,除非将其显式定义为触发器。

Setup your UpdatePanel like this:

  <asp:UpdatePanel ID="UpdatePanel1" runat="server"
        ChildrenAsTriggers="True"  UpdateMode="Always">
      <ContentTemplate>
                       ...
      </ContentTemplate>
  </asp:UpdatePanel>

NOTE: GridView and DetailsView controls are not compatible with the UpdatePanel when their EnableSortingAndPagingCallbacks property is set to true. The default is false.

Using UpdatePanel Controls in Master Pages

UpdateMode Property :

The content of an UpdatePanel control is updated in the following circumstances:

  • If the UpdateMode property is set to Always, the UpdatePanel control's content is updated on every postback that originates from anywhere on the page. This includes asynchronous postbacks from controls that are inside other UpdatePanel controls and postbacks from controls that are not inside UpdatePanel controls.
  • If the UpdatePanel control is nested inside another UpdatePanel control and the parent update panel is updated.
  • If the UpdateMode property is set to Conditional, and one of the following conditions occurs:
    • You call the Update method of the UpdatePanel control explicitly.
    • The postback is caused by a control that is defined as a trigger by using the Triggers property of the UpdatePanel control. In this scenario, the control explicitly triggers an update of the panel content. The control can be either inside or outside the UpdatePanel control that defines the trigger.
    • The ChildrenAsTriggers property is set to true and a child control of the UpdatePanel control causes a postback. A child control of a nested UpdatePanel control does not cause an update to the outer UpdatePanel control unless it is explicitly defined as a trigger.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文