<asp:Panel Visible

M

Mark Rae

Hi,

Is there any way to use the asp:panel Web control so that it is always
created regardless of its Visible property? E.g. if I write the following:

<asp:panel ID=pnlEvent Runat=server Visible=False>
....controls
</asp:panel>

the panel is not actually created. I'd like it to be created but be
invisible, ready for me to make the <div> it creates visible client-side
with JavaScript as and when required, i.e. without a return to and from the
server...

Any assistance gratefully received.

Mark
 
T

Teemu Keiski

Hi,

then you'd add client-side CC styles (CSS: display:none or visibility:
hidden) for example via Panel's Style property. If you use display:none the
space for the object is not kep on the page when it is changed to be hidden.
With visibility: hidden the space is kept even if the object is not visible,
that's their difference.
 
M

Mark Rae

then you'd add client-side CC styles (CSS: display:none or visibility:
hidden) for example via Panel's Style property. If you use display:none the
space for the object is not kep on the page when it is changed to be hidden.
With visibility: hidden the space is kept even if the object is not visible,
that's their difference.

Excellent - thanks very much
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top