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

Discussion in 'ASP .Net' started by Nathan Sokalski, Oct 12, 2006.

  1. 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.
    --
    Nathan Sokalski

    http://www.nathansokalski.com/
    Nathan Sokalski, Oct 12, 2006
    #1
    1. Advertising

  2. >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
    Robert Haken [MVP], Oct 12, 2006
    #2
    1. Advertising

  3. 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

    http://www.nathansokalski.com/

    "Robert Haken [MVP]" <> wrote in message
    news:%...
    > >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
    >
    Nathan Sokalski, Oct 13, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jerad Rose

    Dynamically Show/Hide Groups of TR's

    Jerad Rose, Jun 24, 2003, in forum: ASP .Net
    Replies:
    12
    Views:
    11,574
    intrader
    Jul 10, 2005
  2. jef
    Replies:
    1
    Views:
    4,384
    Steve C. Orr [MVP, MCSD]
    Mar 21, 2005
  3. John Blair
    Replies:
    1
    Views:
    597
  4. Shapper

    Image Button and Show/Hide Panel

    Shapper, Sep 21, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    10,268
    Shapper
    Sep 21, 2005
  5. Nathan Sokalski

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

    Nathan Sokalski, Oct 12, 2006, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    175
    Nathan Sokalski
    Oct 13, 2006
Loading...

Share This Page