Looking for simple container control

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Re: Looking for simple container control

    The problem is that you want to nest this control inside of a table, in
    fact, in between rows of the table. For this, you would need to create your
    own custom Server Control.

    HTH,

    Kevin Spencer
    Microsoft FrontPage MVP
    Internet Developer
    [url]http://www.takempis.com[/url]
    Big things are made up of
    lots of Little things.

    "Jerad Rose" <jeradr@corvusdigital.com> wrote in message
    news:egQSiwyODHA.2224@TK2MSFTNGP10.phx.gbl...
    > Hi gang. I tried posting this under a different topic (Dynamically
    > Show/Hide Groups of TR's), but I thought maybe rewording the topic and
    post
    > may help people to undersand my intentions.
    >
    > I'm looking for a simple container control that can wrap around a set of
    > HTML/server controls just for server-side purposes (show/hide) -- without
    > rendering any HTML. This seems like it would be a common practice, but
    I've
    > not been able to find such a server control.
    >
    > An asp:PlaceHolder would be perfect since it doesn't render any additional
    > HTML, but it doesn't allow any other nested <asp:> server controls at
    design
    > time (which seems silly). And an asp:Panel can wrap around any HTML or
    > server controls, but it renders HTML (div in IE and table in Netscape --
    > which really hoses the HTML). And a <span runat=server> doesn't like
    nested
    > TRs (see example below), plus that's still rendering HTML. And I know
    that
    > in the example below, I can just put runat=server on the TRs, but that's
    > still not what I'm looking for (in my real-life scenario, I may have
    several
    > TRs, and it would be much easier to group them into one container).
    >
    > Here is a pseudo-example, so you can see what I'm trying to accomplish:
    >
    > <table>
    > <tr>
    > <td colspan="4"><asp:Label /></td>
    > </tr>
    > <tr>
    > <td colspan="2"><asp:Label /></td>
    > <td colspan="2"><asp:Label /></td>
    > </tr>
    > <asp:SomeContainerControl>
    > <tr>
    > <td><asp:Label /></td>
    > <td><asp:Label /></td>
    > <td><asp:Label /></td>
    > <td><asp:Label /></td>
    > </tr>
    > <tr>
    > <td><asp:Label /></td>
    > <td><asp:Label /></td>
    > <td><asp:Label /></td>
    > <td><asp:Label /></td>
    > </tr>
    > <tr>
    > <td colspan="2"><asp:Label /></td>
    > <td colspan="2"><asp:Label /></td>
    > </tr>
    > </asp:SomeContainerControl>
    > <tr>
    > <td><asp:Label /></td>
    > <td><asp:Label /></td>
    > <td><asp:Label /></td>
    > <td><asp:Label /></td>
    > </tr>
    > </table>
    >
    > Thanks so much in advance for any suggestions you may have!
    >
    > Jerad
    >
    >

    Kevin Spencer Guest

  2. Similar Questions and Discussions

    1. How to create server control of Container Type
      Hi All, I am trying to build one server control which has one panel and within this panel there will be two more panel. I have created two...
    2. Template control not displaying Container properties
      I am trying to create a templated control for asp.net 2.0 using the example found in the documentation, however when outputing <%# Container.Message...
    3. Building a control to container users html
      I want to be able to create a control that will wrap any html placed inside the control tag with some predefine html. For example is the...
    4. User Control - Accessing Properties from the Container Page
      Dear all, Please check my problem - Problem: I have created a User Control(UC1) for navigating between pages. There are 4 buttons on the user...
    5. ASP.NEt Custom Container control
      I am creating a tab control. I want to allow the user to drop controls on my tab control at design time the way one can drop controls onto a panel...
  3. #2

    Default Looking for simple container control

    Hello,

    I would suggest a simple div tag... you could assign it a
    id and runat server. It should work.

    pepsi

    >-----Original Message-----
    >Hi gang. I tried posting this under a different topic
    (Dynamically
    >Show/Hide Groups of TR's), but I thought maybe rewording
    the topic and post
    >may help people to undersand my intentions.
    >
    >I'm looking for a simple container control that can wrap
    around a set of
    >HTML/server controls just for server-side purposes
    (show/hide) -- without
    >rendering any HTML. This seems like it would be a common
    practice, but I've
    >not been able to find such a server control.
    >
    >An asp:PlaceHolder would be perfect since it doesn't
    render any additional
    >HTML, but it doesn't allow any other nested <asp:> server
    controls at design
    >time (which seems silly). And an asp:Panel can wrap
    around any HTML or
    >server controls, but it renders HTML (div in IE and table
    in Netscape --
    >which really hoses the HTML). And a <span runat=server>
    doesn't like nested
    >TRs (see example below), plus that's still rendering
    HTML. And I know that
    >in the example below, I can just put runat=server on the
    TRs, but that's
    >still not what I'm looking for (in my real-life scenario,
    I may have several
    >TRs, and it would be much easier to group them into one
    container).
    >
    >Here is a pseudo-example, so you can see what I'm trying
    to accomplish:
    >
    ><table>
    > <tr>
    > <td colspan="4"><asp:Label /></td>
    > </tr>
    > <tr>
    > <td colspan="2"><asp:Label /></td>
    > <td colspan="2"><asp:Label /></td>
    > </tr>
    > <asp:SomeContainerControl>
    > <tr>
    > <td><asp:Label /></td>
    > <td><asp:Label /></td>
    > <td><asp:Label /></td>
    > <td><asp:Label /></td>
    > </tr>
    > <tr>
    > <td><asp:Label /></td>
    > <td><asp:Label /></td>
    > <td><asp:Label /></td>
    > <td><asp:Label /></td>
    > </tr>
    > <tr>
    > <td colspan="2"><asp:Label /></td>
    > <td colspan="2"><asp:Label /></td>
    > </tr>
    > </asp:SomeContainerControl>
    > <tr>
    > <td><asp:Label /></td>
    > <td><asp:Label /></td>
    > <td><asp:Label /></td>
    > <td><asp:Label /></td>
    > </tr>
    ></table>
    >
    >Thanks so much in advance for any suggestions you may
    have!
    >
    >Jerad
    >
    >
    >.
    >
    pepsi Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139