<asp:Panel Visible

  • Thread starter Thread starter Mark Rae
  • Start date Start date
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
 
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.
 
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

Back
Top