473,406 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

<asp:Panel Visible

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
Nov 18 '05 #1
2 5997
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.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke

"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:Oi**************@TK2MSFTNGP12.phx.gbl...
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

Nov 18 '05 #2
"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:uB****************@TK2MSFTNGP12.phx.gbl...
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
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Fresh Air Rider | last post by:
Hello Could anyone please explain how I can pass more than one arguement/parameter value to a function using <asp:linkbutton> or is this a major shortfall of the language ? Consider the...
7
by: Venus | last post by:
Hello, I am trying to generate a dynamic form at runtime and would like to do it using "<asp: ..." form elements as follows Build up the string that is placed somewhere in the HTML code the...
3
by: Mark Rae | last post by:
Hi, Is there any way to put a border round several rows in a standard HTML table by surrounding them with an asp:Panel (or a client-side <div>)? When I try, the border doesn't appear, though it...
15
by: John Blair | last post by:
Hi, Code attached but the line that gives me an error is MyDataGrid.Columns(2).Visible = False It actually gives me an error for any value instead of 2 even when 9 bound columns of data exist....
4
by: Alan Silver | last post by:
Hello, I would like to know if it is possible to use a panel, but prevent it from adding a <div> tag to the HTML. The reason I want to do this is that I am using a panel to enable me to...
11
by: Joe | last post by:
Hello All, I have an ASP.NET page with one Textbox (SearchTextBox) and one ImageButton (SearchButton) server controls. The user can type search text in SearchTextBox and click SearchButton and...
0
by: John Smith | last post by:
This is what I am trying to do: <asp:datagrid id="DataGrid1" runat="server" AutoGenerateColumns="False"> <Columns> <asp:BoundColumn Visible="False" DataField="id" ReadOnly="True"...
2
by: Nathan Sokalski | last post by:
I have an HTML table in which I am using ASP:Panel controls to group together <tr>'s so that I can more easily show/hide them (by setting the ASP:Panel's Visible property). This works fine, but...
4
by: Mark Rae | last post by:
Hi, Consider the following: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.