I think you can use skin file. Add App_Themes folder to your project and then add a theme folder and also create a SkinFile and write your style like bellow:
<asp:GridView runat="server" CellPadding="4" ForeColor="#333333" GridLines="None">
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#EFF3FB" />
<EditRowStyle BackColor="#2461BF" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Right" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
Enter your message below
Sign in or Join us (it's free).