0

我试图在运行 sql 查询并将数据放入表中后获取一个 asp.net 表来显示网格线。我现在尝试设置默认标题行以查看网格线是否会出现而它们没有出现。

这是我的表格标记:

    <asp:Table ID="Table1" runat="server" ForeColor="Black" GridLines="Both" Height="330px" Width="950px">
    <asp:TableRow runat="server" BackColor="White" BorderColor="White" BorderStyle="Solid" BorderWidth="5px" Font-Bold="True" Font-Size="X-Small" ForeColor="#993399" HorizontalAlign="Center" VerticalAlign="Top">
        <asp:TableCell runat="server">Customer ID</asp:TableCell>
        <asp:TableCell runat="server">Business Name</asp:TableCell>
        <asp:TableCell runat="server">City</asp:TableCell>
        <asp:TableCell runat="server">State</asp:TableCell>
        <asp:TableCell runat="server">Phone</asp:TableCell>
        <asp:TableCell runat="server">Email</asp:TableCell>
        <asp:TableCell runat="server">Registered</asp:TableCell>
        <asp:TableCell runat="server">Approved</asp:TableCell>
        <asp:TableCell runat="server">Last Contacted</asp:TableCell>
        <asp:TableCell runat="server">Logger</asp:TableCell>
        <asp:TableCell runat="server">Responded</asp:TableCell>
    </asp:TableRow>

那么,如何让网格线显示在我的 asp.net 表上?

4

2 回答 2

2

BorderColor 属性应该使它们可见。由于背景是白色,请尝试将 BorderColor 设置为黑色。

于 2013-07-09T15:11:43.640 回答
1

您需要在表格标签中设置 Border=1。

于 2021-08-09T14:35:04.580 回答