UpdatePanel.Visible = true has no effect

不问归期 提交于 2019-12-05 10:36:46

Are you talking about the ASP.NET Ajax UpdatePanel Control? Try to put a "real" Panel Control (asp:Panel) inside the UpdatePanel and set the visibilty false/true on that control and leave the UpdatePanel visible.

If updatepanel visibility is set to false, it's not rendered on the ouput. Not being rendered, it doesn't exist client side where it then cannot be used (not event by ajax).

Using a placeholder is the solution to your problem.

I searched long and far, experimented, and could not get this to work, unfortunately. My final decision was to wrap the content I wanted to show/hide within Placeholder controls. They give you the flexibility of toggling visibility without adding markup.

You should check to make sure that whatever control contains you panel is visible. If it is not, setting the visible property on the updatepanel control will do nothing so you will need to make sure the container control is visible FIRST.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!