当其他 updatepanel 刷新 updatepanel 时,通过触发器刷新 updatepanel,因为第一个必须具有 UpdateMode=Conditional
我在 ASP.NET 页面中有一些更新面板。我希望 updatepanel 2 在 updatepanel 1 刷新时刷新,但 UpdatePanel 2 的 UpdateMode 属性设置为 Conditional 且 ChildrenAsTrigger=False,因为它内部有另一个 updatePanel,我需要控制它的刷新方式。我试图触发另一个更新面板,但这似乎不起作用,也许我错过了一些东西
有没有办法做到这一点?
如果您无法找到有效的示例,请想象产品类别列表和产品列表,当所选类别更改(更新面板内的链接按钮)刷新位于另一个更新面板内的产品列表时,产品列表会发生变化,例如当您按价格订购时(订单为在其他更新面板内)并且我不希望刷新类别列表。
提前致谢。
I have some updatepanels in asp.net page. I want updatepanel 2 get refreshed when updatepanel 1 does, but UpdatePanel 2 has his UpdateMode attributed set to Conditional and ChildrenAsTrigger=False, because it has another updatePanels inside and i need to control the way it is refreshed. I was trying to make a trigger for the other updatepanel but this seems not work, maybe i am missing something
Is there a way to make this happen?
If you can't figure a valid example, imagine product category list and product list, when selected category change (linkbutton inside updatepanel) product list is refreshed which is inside another updatepanel, product list change for example when you order by price (order is inside other updatepanel) and i don't want category list gets refreshed.
thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以调用
updatePanelProdList.Update( )
在页面的代码隐藏文件中。在您的场景中调用此方法的位置是类别更改 LinkButton 的事件处理程序。You can call
updatePanelProdList.Update()
inside the code-behind file of your page. The place to call this method in your scenario would be the event handler for the category change LinkButton.谢谢你,这就是我正在寻找的!我的页面上有 2 个“更新面板”,一个保留我的表单,另一个保留 FlexiGrid(非 .net 版本,纯 jQuery)。
我从网格中执行手动 AsyncPostBack 以进入编辑或删除模式。
然后我像
在确定 EventName 和 EventValue 调用下面的方法之后
一样处理它。
(对不起我的英语)
Thank you, that's what i am looking for! I have 2 "Update Panel" on my page, one keeping my form and other one keeping flexiGrid (non .net version,pure jQuery).
I do manual AsyncPostBack from my grid to get in edit or delete mode.
and then i handle it like
after determinate EventName and EventValue calling the method below
regards.
(sorry for my English)