Change asp.net components css class if browser is IE
<p>I have a Gridview one of it's columns ItemStyle has a css class named xyz i want to change css class to xyzie if the browser is IE , how can i do that ?</p>

<p>example code :</p>

<pre><code> &lt;asp:GridView ID="GridView1" runat="server" 
    AutoGenerateColumns="False" DataKeyNames="y" 
    DataSourceID="SqlDataSource1" GridLines="None" ShowHeader="False" 
    onselectedindexchanged="GridView1_SelectedIndexChanged" 
    AllowSorting="True" CellSpacing="5" 
    onrowdatabound="GridView1_RowDataBound"&gt;
&lt;Columns&gt;
    &lt;asp:BoundField DataField="x" HeaderText="x" SortExpression="x" &gt;
    &lt;ItemStyle CssClass="xyz" /&gt; // want to change this to xyzie if the browser is ie
    &lt;/asp:BoundField&gt;
 &lt;/Columns&gt;
&lt;/asp:GridView&gt;
</code></pre>

<hr>

<p>i solved the issue using volpav's answer,</p>

<pre><code>   System.Web.HttpBrowserCapabilities browser = Request.Browser;
   if (browser.Browser == "IE")
    {
        GridView1.Columns[0].ItemStyle.CssClass = "xyzie";
    }       
    else { GridView1.Columns[0].ItemStyle.CssClass = "xyz"; }
</code></pre>

<p>thanks for your help.</p>
