+1-888-365-2779
Try Now
More in this section

Forums / Designing with Sitefinity / t h e a d, t f o o t and t b o d y tags being removed from custom controls

t h e a d, t f o o t and t b o d y tags being removed from custom controls

4 posts, 0 answered
  1. Christopher
    Christopher avatar
    22 posts
    Registered:
    09 Jun 2008
    01 Aug 2008
    Link to this post
    Hi,

    I have a custom control that has a table that uses the t h e a d, t f o o t and t b o d y tags specified (I don't think I can use the real tags names It caused an issue with my previous post). I'm using these so I can define table header and footer styles in my css themes. It seems that the rendered sitefinity pages are removing these tags so I'm unable to reference them in my css.

    Is there anything I can do in order to keep these tags from being removed?

    I'll post the control code and the resulting page source code below. Any help would be appreciated.

    Thx,
    Chris

    Telerik Admin Note: Attached is the code from the previous (broken) thread.
  2. Katia
    Katia avatar
    194 posts
    Registered:
    01 Jul 2016
    05 Aug 2008
    Link to this post
    Hi Christopher,

    Please send us the custom control, I mean the .ascx and .cs files. We cannot reproduce the issue using the files you sent. What you described is really strange and we doubt that Sitefinity removes these tags.

    Thanks for your cooperation in advance.

    Regards,
    Katia
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Christopher
    Christopher avatar
    22 posts
    Registered:
    09 Jun 2008
    05 Aug 2008
    Link to this post

    Thanks for getting back to me on this. I found this strange as well. I did try adding this control to an external .aspx page and it rendered fine the tags were still there. I’ve included the requested code although there is not much else to it. I took out all the code behind and the issue still occurs.

    <%@ Control Language="vb" AutoEventWireup="false" Inherits="Aptify.Framework.Web.eBusiness.AbstractControl" CodeFile="Abstracts.ascx.vb" %> 
    <%@ Register TagPrefix="cc2" Namespace="Aptify.Framework.Web.eBusiness" Assembly="EBusinessGlobal" %> 
    <%@ Register TagPrefix="cc3" Namespace="Aptify.Framework.Web.eBusiness" Assembly="AptifyEBusinessUser" %> 
     <div id="AptifyControl"
        <table runat="server" id="tblMain"
    <thead> 
            <tr> 
                <th colspan="2"
                    Abstract Submission</th> 
            </tr> 
    </thead> 
    <tfoot> 
          <tr> 
            <td colspan="2"><asp:Button ID="cmdSubmit" Runat="server" Text="Submit Abstract"></asp:Button></td
          </tr> 
    </tfoot> 
    <tbody> 
          <tr> 
            <td>Subject</td> 
            <td> 
              <asp:TextBox id="txtSubject" runat="server"></asp:TextBox></td
          </tr> 
          <tr> 
            <td>Title</td> 
            <td> 
              <asp:TextBox id="txtTitle" runat="server" TextMode="MultiLine" ></asp:TextBox></td
          </tr> 
          <tr> 
            <td>Category</td> 
            <td> 
              <asp:DropDownList id="cmbCategory" runat="server"></asp:DropDownList></td
          </tr> 
          <tr> 
            <td>Summary</td> 
            <td> 
              <asp:TextBox id="txtSummary" runat="server" TextMode="MultiLine"></asp:TextBox></td
          </tr> 
          <tr> 
            <td>Body</td> 
            <td> 
              <asp:TextBox id="txtBody" runat="server" TextMode="MultiLine"></asp:TextBox></td
          </tr> 
    </tbody>          
        </table> 
          <asp:Label id="lblMessage" runat="server" Visible="False"></asp:Label> 
          <cc3:User id="AptifyEbusinessUser1" runat="server"></cc3:User> 
     </div> 

     

    Option Explicit On 
    Option Strict On 
     
     
        Partial Class AbstractControl 
            Inherits System.Web.UI.UserControl 
     
        End Class 
     
     

    Thanks,
    Chris

  4. Katia
    Katia avatar
    194 posts
    Registered:
    01 Jul 2016
    06 Aug 2008
    Link to this post
    Hi Christopher,

    I looks like this is a .NET problem. We've created a new website outside Sitefinity and THEAD and TFOOT tags were removed if the table had runat="server". When we removed 

    runat="server" id="tblMain"

    from TABLE tag, THEAD and TFOOT tags were rendered as expected.

    I suggest that you remove runat="server" id="tblMain" if you don't manipulate with the table from the code behind. Or, the other solution is to set classes to the TRs and rewrite your CSS accordingly.

    <table runat="server" id="tblMain">

    <

    thead>

    <tr class="thead">

    <th colspan="2">

    Abstract Submission

    </th>

    </tr>

    </

    thead>

    <

    tbody>

    <tr>

    <td>Subject</td>

    <td>

    <asp:TextBox id="txtSubject" runat="server"></asp:TextBox></td>

    </tr>

    <tr>

    <td>Title</td>

    <td>

    <asp:TextBox id="txtTitle" runat="server" TextMode="MultiLine" ></asp:TextBox></td>

    </tr>

    <tr>

    <td>Category</td>

    <td>

    <asp:DropDownList id="cmbCategory" runat="server"></asp:DropDownList></td>

    </tr>

    <tr>

    <td>Summary</td>

    <td>

    <asp:TextBox id="txtSummary" runat="server" TextMode="MultiLine"></asp:TextBox></td>

    </tr>

    <tr>

    <td>Body</td>

    <td>

    <asp:TextBox id="txtBody" runat="server" TextMode="MultiLine"></asp:TextBox></td>

    </tr>

    </

    tbody>

    <

    tfoot>

    <tr class="tfoot">

    <td colspan="2"><asp:Button ID="cmdSubmit" Runat="server" Text="Submit Abstract"></asp:Button></td>

    </tr>

    </

    tfoot>

    </table>



    All the best,
    Katia
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
4 posts, 0 answered