panel inserted unwanted div tag

Discussion in 'ASP .Net' started by DC Gringo, Sep 23, 2004.

  1. DC Gringo

    DC Gringo Guest

    I have a panel that's inserting and unwanted <div> tag around it ...how can
    I disable that?

    <ASP:pANEL ID="pnlCentralAmerica" RUNAT="server" >
    <LI CLASS="rightSideBar">
    <A HREF='/weather/?pageID=weatherDoc&amp;g=<% = centralAmericaGcId
    %>' CLASS="secondNav">
    <% = centralAmericaDate %><U>C Amer/Haiti</U>:<% =
    centralAmericaOneliner %></A>
    </li>
    </ASP:pANEL>


    Is outputting:

    <div id="WeatherFront1_pnlCentralAmerica">

    <LI CLASS="rightSideBar">
    <A HREF='/weather/?pageID=weatherDoc&amp;g=0' CLASS="secondNav">

    <U>C Amer/Haiti</U>:</A></li>
    </div>

    --
    _____
    DC G
    DC Gringo, Sep 23, 2004
    #1
    1. Advertising

  2. DC Gringo

    Greg Burns Guest

    Try using a PlaceHolder instead of a Panel.

    Greg

    "DC Gringo" <> wrote in message
    news:OGeMC$...
    >I have a panel that's inserting and unwanted <div> tag around it ...how can
    > I disable that?
    >
    > <ASP:pANEL ID="pnlCentralAmerica" RUNAT="server" >
    > <LI CLASS="rightSideBar">
    > <A HREF='/weather/?pageID=weatherDoc&amp;g=<% = centralAmericaGcId
    > %>' CLASS="secondNav">
    > <% = centralAmericaDate %><U>C Amer/Haiti</U>:<% =
    > centralAmericaOneliner %></A>
    > </li>
    > </ASP:pANEL>
    >
    >
    > Is outputting:
    >
    > <div id="WeatherFront1_pnlCentralAmerica">
    >
    > <LI CLASS="rightSideBar">
    > <A HREF='/weather/?pageID=weatherDoc&amp;g=0' CLASS="secondNav">
    >
    > <U>C Amer/Haiti</U>:</A></li>
    > </div>
    >
    > --
    > _____
    > DC G
    >
    >
    Greg Burns, Sep 23, 2004
    #2
    1. Advertising

  3. What else do you expect Asp:panel to be rendered as?

    Eliyahu

    "DC Gringo" <> wrote in message
    news:OGeMC$...
    > I have a panel that's inserting and unwanted <div> tag around it ...how

    can
    > I disable that?
    >
    > <ASP:pANEL ID="pnlCentralAmerica" RUNAT="server" >
    > <LI CLASS="rightSideBar">
    > <A HREF='/weather/?pageID=weatherDoc&amp;g=<% = centralAmericaGcId
    > %>' CLASS="secondNav">
    > <% = centralAmericaDate %><U>C Amer/Haiti</U>:<% =
    > centralAmericaOneliner %></A>
    > </li>
    > </ASP:pANEL>
    >
    >
    > Is outputting:
    >
    > <div id="WeatherFront1_pnlCentralAmerica">
    >
    > <LI CLASS="rightSideBar">
    > <A HREF='/weather/?pageID=weatherDoc&amp;g=0' CLASS="secondNav">
    >
    > <U>C Amer/Haiti</U>:</A></li>
    > </div>
    >
    > --
    > _____
    > DC G
    >
    >
    Eliyahu Goldin, Sep 23, 2004
    #3
  4. Well it is actually the correct behaviour of an ASP.NET control, every ASP.NET control is meant to render HTML code to the client browser, in the case of a panel it is rendered as a DIV tag...no browser knows what an <ASP:pANEL ... RUNAT="server"> tag is, they only understand HTML (apart from scripts and other objects with the help of plugins, but HTML mainly).

    Hope this helps

    Alan Ferrandiz Langley [MCT]




    "DC Gringo" <> escribió en el mensaje news:OGeMC$...
    > I have a panel that's inserting and unwanted <div> tag around it ....how can
    > I disable that?
    >
    > <ASP:pANEL ID="pnlCentralAmerica" RUNAT="server" >
    > <LI CLASS="rightSideBar">
    > <A HREF='/weather/?pageID=weatherDoc&amp;g=<% = centralAmericaGcId
    > %>' CLASS="secondNav">
    > <% = centralAmericaDate %><U>C Amer/Haiti</U>:<% =
    > centralAmericaOneliner %></A>
    > </li>
    > </ASP:pANEL>
    >
    >
    > Is outputting:
    >
    > <div id="WeatherFront1_pnlCentralAmerica">
    >
    > <LI CLASS="rightSideBar">
    > <A HREF='/weather/?pageID=weatherDoc&amp;g=0' CLASS="secondNav">
    >
    > <U>C Amer/Haiti</U>:</A></li>
    > </div>
    >
    > --
    > _____
    > DC G
    >
    >
    Alan Ferrandiz [MCT], Sep 23, 2004
    #4
    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. Rob Nicholson

    WebControls.Panel versus DIV tag

    Rob Nicholson, Feb 24, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    3,906
    Rob Nicholson
    Feb 25, 2005
  2. Replies:
    0
    Views:
    367
  3. shruds
    Replies:
    1
    Views:
    749
    John C. Bollinger
    Jan 27, 2006
  4. M Wells
    Replies:
    0
    Views:
    130
    M Wells
    Oct 6, 2004
  5. visu
    Replies:
    4
    Views:
    277
Loading...

Share This Page