views:

1262

answers:

3

Hi all

There is a wide task. There is an update panel upDetails, which displays details table (initialy visible = false) when user selects any item from master table, we should set upDetails.Visible = true;

But it soesn't work whatever place/event I had placed it - neither BL methods, neither pre-render. It still be invisible

But when I do not make it initialy invisible, all works fine

What do I do wrong?

Thanks in advance

+1  A: 

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.

splattne
I've been pondering of that approach if nothing else would help, but I wonder why such happens and is it possible to avoid adding redundant panel ?
A: 

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.

Kelsey
A: 

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.

Matthew