【问题标题】:Update a ASP.NET UpdatePanel from the code behind with no ContentTemplate从没有 ContentTemplate 的代码中更新 ASP.NET UpdatePanel
【发布时间】:2011-01-14 00:38:43
【问题描述】:

我知道您可以通过在 UpdatePanel 服务器端调用 Update 函数来调用更新。我过去曾这样做过,尽管过去我也有一个 ContentTemplate。

在我当前的一个项目中,我将所有控件添加到后面代码中的 UpdatePanel 中,因此没有定义 ContentTemplate。尽管如此,有没有办法从后面的代码中更新 UpdatePanel,还是我找错了树?

UpdatePanel 定义看起来像这样,只有占位符,我在后面的代码中添加了一个菜单、一个 MultiView 和 n 个 GridView。

<asp:UpdatePanel  runat="server" updatemode="Conditional">
<ContentTemplate>
    <asp:PlaceHolder runat="server" />
</ContentTemplate>

【问题讨论】:

  • 看起来你有一个内容模板。?
  • 这不起作用,我认为这是因为它是一个占位符而不是控件本身。

标签: c# asp.net ajax


【解决方案1】:
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-12-05
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多