GridView好的样式|GridView管理模板|GridView管理好的样式
<asp:GridView ID="gvList" runat="server" AutoGenerateColumns="False" BorderColor="#337FB2"
BorderWidth="2px" CellPadding="4" Font-Size="Small" ForeColor="#333333" Height="32%"
OnRowDataBound="gvList_RowDataBound" Width="100%">
<columns>
<asp:BoundField HeaderText="编号">
<itemstyle Width="5%" /> </asp:BoundField>
<asp:BoundField DataField="U_Name" HeaderText="用户名">
<itemstyle Width="10%" /> </asp:BoundField>
<asp:BoundField DataField="U_State" HeaderText="状态">
<itemstyle Width="10%" /> </asp:BoundField>
<asp:BoundField DataField="U_IP" HeaderText="IP">
<itemstyle Width="25%" /> </asp:BoundField>
<asp:BoundField DataField="L_Date" HeaderText="时间">
<itemstyle Width="5%" /> </asp:BoundField>
</columns>
<RowStyle BackColor="White" Font-Bold="True" Font-Size="Small" ForeColor="#003399"
HorizontalAlign="Center" />
<EditRowStyle BackColor="#999999" />
<SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
<pagerstyle BackColor="#337FB2" ForeColor="White" HorizontalAlign="Center" VerticalAlign="Middle" />
<headerstyle BackColor="#337FB2" CssClass="BODY" Font-Size="12px" ForeColor="White"
HorizontalAlign="Center" VerticalAlign="Middle" />
<AlternatingRowStyle BackColor="#E8F4FF" Font-Bold="True" Font-Size="Small" HorizontalAlign="Center" />
<footerstyle BackColor="#A6A1E0" Font-Bold="True" ForeColor="White" />
</asp:GridView>