使用"ImgButton"的Click事件从UpdatePanel1内部隐藏/显示UpdatePanel2. [英] Hide/Show UpdatePanel2 From Within UpdatePanel1Using Click Event of "ImgButton"

查看:126
本文介绍了使用"ImgButton"的Click事件从UpdatePanel1内部隐藏/显示UpdatePanel2.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的aspx使用Site.Master.在BodyContent中,有一个AJAX tabcontainer/tabpanel,它具有一个包含表的UpdatePanel("pnlRecurring"). 一个单元格包含一个ImageButton,其click事件设置第二个UpdatePanel的visible属性("pnlAssgnSummary").

但是,当我尝试从pnlRecurring修改pnlAssgnSummary的可见性时,它不会受到影响.但是,当我将该控件移到pnlRecurring之外时,可以操纵pnlAssgnSummary的可见性.

我使用"updatePanel",以便可以一次隐藏/显示多个对象.我是删除面板并单独隐藏/显示每个对象的唯一选择吗?

My aspx uses a Site.Master. In the BodyContent, there is an AJAX tabcontainer/tabpanel, that has an UpdatePanel ("pnlRecurring") containing a table.
One cell contains an ImageButton, whose click event sets the visible property of a second UpdatePanel ("pnlAssgnSummary").

However pnlAssgnSummary''s visibility is not affected when I attempt to modify it from pnlRecurring. However when I move that control outside of the pnlRecurring, pnlAssgnSummary''s visibility can be manipulated.

I use an "updatePanel" so that I can hide/show several objects at one time. Is my only option to remove the panel, and hide/show each object individually?

推荐答案

我找到了答案.我只需要一个TabContainer控件周围的UpdatePanel.因此,我将每个其他UpdatePanels更改为一个Panel,并且Click事件中的代码按设计执行.
I found the answer. I need only one UpdatePanel around the TabContainer control. So I changed each of the other UpdatePanels to a Panel, and the code within the Click event performs as designed.


这篇关于使用"ImgButton"的Click事件从UpdatePanel1内部隐藏/显示UpdatePanel2.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆