如何在ASP.NET表中创建thead和tbody? [英] How to create thead and tbody in ASP.NET Table ?

查看:88
本文介绍了如何在ASP.NET表中创建thead和tbody?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在ASP.NET表中创建thead和tbody?我需要那些标签,因为jquery和asp.net只给我tr,th和td。

How to create thead and tbody in ASP.NET Table? I need those tags because of jquery and asp.net gives me only tr, th and td.

推荐答案

asp:表不支持这些元素。

asp:Table does not support these elements.


更新:由于 jameh的回答显示,上面的句子是完全错误的: TableSection 属性允许控制
是否给定行进入表的标题,正文或页脚。

Update: As jameh's answer reveals, the sentence above is completely wrong: the TableSection property allows to control whether a given row goes into the table's header, body or footer.

要详细说明他的回答,似乎你甚至可以通过设置<标记中的code> TableSection 属性,没有代码:

To elaborate on his answer, it seems you can even achieve this declaratively by setting the TableSection property in your markup, without code behind:

<asp:Table id="yourId" runat="server">
    <asp:TableHeaderRow TableSection="TableHeader">
        <!-- ... -->
    </asp:TableHeaderRow>
    <asp:TableRow>
        <!-- 'TableSection' defaults to 'TableRowSection.TableBody'. -->
        <!-- ... -->
    </asp:TableRow>
    <asp:TableRow TableSection="TableFooter">
        <!-- ... -->
    </asp:TableRow>
</asp:Table>








原创,现在没有实际答案如下:

您可能想尝试 HtmlTable 类:

<table id="yourId" runat="server">
    <thead>
        .
        .
        .
    </thead>
    <tbody>
        .
        .
        .
    </tbody>
</table>

这篇关于如何在ASP.NET表中创建thead和tbody?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆