views:

94

answers:

1

Here's my table:

  <table class="detailTable">
        <tr>
            <th>
                Event Title:
            </th>
            <td>
                <asp:Label ID="lblTitle" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <th>
                Date:
            </th>
            <td>
                <asp:TextBox ID="txtDate" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <th>
                Begin Time:
            </th>
            <td>
                <asp:TextBox ID="txtBeginTime" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <th>
                End Time:
            </th>
            <td>
                <asp:TextBox ID="txtEndTime" runat="server"></asp:TextBox>
            </td>
        </tr>
        <!-- I need to wrap these last two rows in some kind of server control -->
        <tr>
            <th>
                Duration:
            </th>
            <td>
                <asp:TextBox ID="txtHours" runat="server"></asp:TextBox>
                :
                <asp:TextBox ID="txtMins" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <th>
                Concurrency:
            </th>
            <td>
                <asp:TextBox ID="txtConcurrency" runat="server"></asp:TextBox>
            </td>
        </tr>
    </table>

As the comment states, I need to wrap the last two rows in some kind of control so that I can conditionally hide them on the server side.

I know that I can add runat="server" to the rows and hide them individually, but I don't want to do that. I also don't want to hide them client side. A panel would be good, but it renders a div, making the HTML invalid. TBODY with runat="server" is invalid also. The Literal control can't contain other controls, so it's out.

Is there a control that I am missing that will accomplish this? I basically need a Panel control that renders only what it contains and nothing more. Is there a way to change the panel control so that it doesn't render a wrapping div?

+3  A: 

What about a placeholder control?

That's what it is designed for.

Oded
That's exactly what I needed. I had never used it before.
Ronnie Overby