Design View when using an ASP:Panel to show/hide groups of <tr>'s

N

Nathan Sokalski

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 Visual Studio .NET
2005's Design View always hides the <tr>'s regardless of whether the
ASP:panel's Visible property is set to True, False, or not set at all. Is
there some way I can stop Visual Studio .NET 2005's Design View from hiding
my <tr>'s that are inside ASP:panel controls? Thanks.
 
R

Robert Haken [MVP]

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 Visual Studio .NET
2005's Design View always hides the <tr>'s regardless of whether the
ASP:panel's Visible property is set to True, False, or not set at all. Is
there some way I can stop Visual Studio .NET 2005's Design View from hiding
my <tr>'s that are inside ASP:panel controls? Thanks.

asp:panel contol usually renders as <div>...</div> tag. It is not suitable
for hiding <tr>s. Use asp:placeHolder, which does not have any wrapping
tags.

Robert Haken [MVP ASP/ASP.NET]
HAVIT, s.r.o., www.havit.cz
http://knowledge-base.havit.cz
 
N

Nathan Sokalski

Would I use the asp:placeHolder control the same way? I have never used the
asp:placeHolder control before. Would my basic tag layout be the following:

<asp:placeHolder>
<tr>...</tr>
<tr>...</tr>
<tr>...</tr>
</asp:placeHolder>
<asp:placeHolder>
<tr>...</tr>
<tr>...</tr>
<tr>...</tr>
</asp:placeHolder>

Thanks.
--
Nathan Sokalski
(e-mail address removed)
http://www.nathansokalski.com/

Robert Haken said:
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 Visual Studio .NET
2005's Design View always hides the <tr>'s regardless of whether the
ASP:panel's Visible property is set to True, False, or not set at all. Is
there some way I can stop Visual Studio .NET 2005's Design View from
hiding my <tr>'s that are inside ASP:panel controls? Thanks.

asp:panel contol usually renders as <div>...</div> tag. It is not suitable
for hiding <tr>s. Use asp:placeHolder, which does not have any wrapping
tags.

Robert Haken [MVP ASP/ASP.NET]
HAVIT, s.r.o., www.havit.cz
http://knowledge-base.havit.cz
 

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

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top