VS2005 Designer does NOT display asp:panels!! Why?

Discussion in 'ASP .Net' started by Rob Dob, Dec 6, 2005.

  1. Rob Dob

    Rob Dob Guest

    The following code works fine when executed, however will not display
    correctly within the VS2005 Designer, why is this? is this a bug? it
    works fine in VS2003, If I move the ASP:panel to also contain the <TABLE
    then everything displays correctly, but my orginal VS2003 code makes use of
    panels to include or exclude html based upon there visible property. So Not
    having support for this in VS2005 is a real pain.


    **** DOES NOT WORK ****
    <TABLE id="Table1" cellSpacing="0" cellPadding="1" width=706px
    bgColor="#e4e5ef" border="0">
    <asp:panel ID="Panel1" runat="server">
    <TR>
    <TD>
    <h1>HEADING1</h1>
    </TD>
    </TR>
    </asp:panel>
    </TABLE>


    **** DOES DOES WORK ****
    <asp:panel ID="Panel1" runat="server">
    <TABLE id="Table1" cellSpacing="0" cellPadding="1" width=706px
    bgColor="#e4e5ef" border="0">
    <TR>
    <TD>
    <h1>HEADING1</h1>
    </TD>
    </TR>
    </TABLE>
    </asp:panel>
     
    Rob Dob, Dec 6, 2005
    #1
    1. Advertising

  2. For what it's worth, you can give your TR an id and runat server. Then you
    can set it's visible property as you would the panel. Then you can just get
    rid of the panel altogether.

    <TABLE id="Table1" cellSpacing="0" cellPadding="1" width=706px
    bgColor="#e4e5ef" border="0">
    <TR ID="HtmlTableRow1" runat="server">
    <TD>
    <h1>HEADING1</h1>
    </TD>
    </TR>
    </TABLE>


    "Rob Dob" wrote:

    > The following code works fine when executed, however will not display
    > correctly within the VS2005 Designer, why is this? is this a bug? it
    > works fine in VS2003, If I move the ASP:panel to also contain the <TABLE
    > then everything displays correctly, but my orginal VS2003 code makes use of
    > panels to include or exclude html based upon there visible property. So Not
    > having support for this in VS2005 is a real pain.
    >
    >
    > **** DOES NOT WORK ****
    > <TABLE id="Table1" cellSpacing="0" cellPadding="1" width=706px
    > bgColor="#e4e5ef" border="0">
    > <asp:panel ID="Panel1" runat="server">
    > <TR>
    > <TD>
    > <h1>HEADING1</h1>
    > </TD>
    > </TR>
    > </asp:panel>
    > </TABLE>
    >
    >
    > **** DOES DOES WORK ****
    > <asp:panel ID="Panel1" runat="server">
    > <TABLE id="Table1" cellSpacing="0" cellPadding="1" width=706px
    > bgColor="#e4e5ef" border="0">
    > <TR>
    > <TD>
    > <h1>HEADING1</h1>
    > </TD>
    > </TR>
    > </TABLE>
    > </asp:panel>
    >
    >
    >
     
    =?Utf-8?B?SmVk?=, Dec 6, 2005
    #2
    1. Advertising

  3. Rob Dob

    Rob Dob Guest

    > For what it's worth, you can give your TR an id and runat server. Then
    > you
    > can set it's visible property as you would the panel. Then you can just
    > get
    > rid of the panel altogether.
    >
    > <TABLE id="Table1" cellSpacing="0" cellPadding="1" width=706px
    > bgColor="#e4e5ef" border="0">
    > <TR ID="HtmlTableRow1" runat="server">
    > <TD>
    > <h1>HEADING1</h1>
    > </TD>
    > </TR>
    > </TABLE>
    >



    thank you ,, I understand that, but am more interested in being able to use
    panels, because as this is the way my current program has been setup using
    vs2003.

    thanks.
     
    Rob Dob, Dec 6, 2005
    #3
  4. Rob Dob

    Bruce Barker Guest

    a panel renders as a <div> and a div is only legal between <td> or <th> tags
    in html markup.

    -- bruce (sqlwork.com)

    "Rob Dob" <> wrote in message
    news:ui8Ivnp%...
    > The following code works fine when executed, however will not display
    > correctly within the VS2005 Designer, why is this? is this a bug? it
    > works fine in VS2003, If I move the ASP:panel to also contain the <TABLE
    > then everything displays correctly, but my orginal VS2003 code makes use
    > of panels to include or exclude html based upon there visible property.
    > So Not having support for this in VS2005 is a real pain.
    >
    >
    > **** DOES NOT WORK ****
    > <TABLE id="Table1" cellSpacing="0" cellPadding="1" width=706px
    > bgColor="#e4e5ef" border="0">
    > <asp:panel ID="Panel1" runat="server">
    > <TR>
    > <TD>
    > <h1>HEADING1</h1>
    > </TD>
    > </TR>
    > </asp:panel>
    > </TABLE>
    >
    >
    > **** DOES DOES WORK ****
    > <asp:panel ID="Panel1" runat="server">
    > <TABLE id="Table1" cellSpacing="0" cellPadding="1" width=706px
    > bgColor="#e4e5ef" border="0">
    > <TR>
    > <TD>
    > <h1>HEADING1</h1>
    > </TD>
    > </TR>
    > </TABLE>
    > </asp:panel>
    >
    >
     
    Bruce Barker, Dec 6, 2005
    #4
  5. Rob Dob

    Rob Dob Guest


    >a panel renders as a <div> and a div is only legal between <td> or <th>
    >tags
    > in html markup.
    >

    thank you, is this only since vs2005, as it displays fine within vs2003
    design mode
     
    Rob Dob, Dec 6, 2005
    #5
  6. Rob Dob

    Marina Guest

    It is? I've been using and seen div's all over the place that were not in
    <td> or <th> tags. They've all rendered and worked just fine.

    div is just a container element, you should be able to use it wherever it
    would make sense to have a container.

    Lastly, the MSDN documentation on div does not mention any such
    restrictions. I would be interested to know where it says that divs are only
    valid within td or th tags.

    "Bruce Barker" <> wrote in message
    news:uO2FbRq%...
    >a panel renders as a <div> and a div is only legal between <td> or <th>
    >tags in html markup.
    >
    > -- bruce (sqlwork.com)
    >
    > "Rob Dob" <> wrote in message
    > news:ui8Ivnp%...
    >> The following code works fine when executed, however will not display
    >> correctly within the VS2005 Designer, why is this? is this a bug? it
    >> works fine in VS2003, If I move the ASP:panel to also contain the <TABLE
    >> then everything displays correctly, but my orginal VS2003 code makes use
    >> of panels to include or exclude html based upon there visible property.
    >> So Not having support for this in VS2005 is a real pain.
    >>
    >>
    >> **** DOES NOT WORK ****
    >> <TABLE id="Table1" cellSpacing="0" cellPadding="1" width=706px
    >> bgColor="#e4e5ef" border="0">
    >> <asp:panel ID="Panel1" runat="server">
    >> <TR>
    >> <TD>
    >> <h1>HEADING1</h1>
    >> </TD>
    >> </TR>
    >> </asp:panel>
    >> </TABLE>
    >>
    >>
    >> **** DOES DOES WORK ****
    >> <asp:panel ID="Panel1" runat="server">
    >> <TABLE id="Table1" cellSpacing="0" cellPadding="1" width=706px
    >> bgColor="#e4e5ef" border="0">
    >> <TR>
    >> <TD>
    >> <h1>HEADING1</h1>
    >> </TD>
    >> </TR>
    >> </TABLE>
    >> </asp:panel>
    >>
    >>

    >
    >
     
    Marina, Dec 6, 2005
    #6
  7. Rob Dob

    cpnet Guest

    I think what Bruce meant was that within a <table> element, a <div> can only
    be used within a <td> or <td> element. If you're not within a table, you
    can use <div>'s pretty much anywhere. This is an HTML limitation, not an MS
    one.
     
    cpnet, Dec 6, 2005
    #7
  8. Rob Dob

    Marina Guest

    ok, i see, that makes sense now.

    "cpnet" <> wrote in message
    news:e9ZrCvq%...
    >I think what Bruce meant was that within a <table> element, a <div> can
    >only
    > be used within a <td> or <td> element. If you're not within a table, you
    > can use <div>'s pretty much anywhere. This is an HTML limitation, not an
    > MS
    > one.
    >
    >
     
    Marina, Dec 6, 2005
    #8
  9. This is the difference between HTML and XHTML. You could get away with a
    lot in HTML (VS 2003), but you have to have well-formed XHTML (VS 2005)
    which means that you cannot have a <div> between <table> and <tr>.
    --
    Christopher A. Reed
    "The oxen are slow, but the earth is patient."

    "Rob Dob" <> wrote in message
    news:OHbYWaq%...
    >
    >>a panel renders as a <div> and a div is only legal between <td> or <th>
    >>tags
    >> in html markup.
    >>

    > thank you, is this only since vs2005, as it displays fine within vs2003
    > design mode
    >
    >
     
    Christopher Reed, Dec 7, 2005
    #9
    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. Martin Robins

    VS2005: ASP.net forms designer: Intellisense

    Martin Robins, Mar 31, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    515
    Teemu Keiski
    Mar 31, 2006
  2. =?Utf-8?B?Q2hyaXMgRGF2b2xp?=

    Panels in VS2005 - not displaying content in design mode

    =?Utf-8?B?Q2hyaXMgRGF2b2xp?=, Sep 10, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    489
    =?Utf-8?B?Q2hyaXMgRGF2b2xp?=
    Sep 10, 2006
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,076
    Smokey Grindel
    Dec 2, 2006
  4. Just Me
    Replies:
    1
    Views:
    355
    Just Me
    Jan 14, 2007
  5. Rob Dob

    VS2005 Designer does NOT display asp:panels!! Why?

    Rob Dob, Dec 6, 2005, in forum: ASP .Net Web Controls
    Replies:
    8
    Views:
    184
    Christopher Reed
    Dec 7, 2005
Loading...

Share This Page