title: Highlight Gridview selected row asp.net (visual studio 2012)
body: <p>How do I highlight a selected gridview row in asp.net (visual studio 2012)</p>
  
  <p>Here is my .aspx code</p>
  
  <pre><code>&lt;asp:GridView ID="LessonsGridView" runat="server" AutoGenerateColumns="False" DataKeyNames="swim_ID,Expr2,fac_ID" DataSourceID="LessonsDataSource" AllowSorting="True" Width="1050px"&gt;
  &lt;AlternatingRowStyle BackColor="White" ForeColor="#284775" /&gt;
      &lt;Columns&gt;
      &lt;asp:CommandField ShowSelectButton="True" /&gt;
      &lt;asp:BoundField DataField="swim_ID" HeaderText="Class ID" ReadOnly="True" SortExpression="swim_ID" /&gt;
      &lt;asp:BoundField DataField="swim_Start" HeaderText="Start Date" SortExpression="swim_Start" /&gt;
      &lt;asp:BoundField DataField="swim_Num_Classes" HeaderText="Lessons" SortExpression="swim_Num_Classes" /&gt;
      &lt;asp:BoundField DataField="fac_Street" HeaderText="Street" SortExpression="fac_Street" /&gt;
      &lt;asp:BoundField DataField="fac_City" HeaderText="City" SortExpression="fac_City" /&gt;
      &lt;asp:BoundField DataField="lev_Name" HeaderText="Level" SortExpression="lev_Name" /&gt;
      &lt;asp:BoundField DataField="lev_Cost" HeaderText="Cost" SortExpression="lev_Cost" /&gt;
      &lt;asp:BoundField DataField="lev_Max_Enroll" HeaderText="Max Space" SortExpression="lev_Max_Enroll" /&gt;
      &lt;asp:BoundField DataField="lev_Min_Age" HeaderText="Min Age" SortExpression="lev_Min_Age" /&gt;
      &lt;asp:BoundField DataField="lev_Max_Age" HeaderText="Max Age" SortExpression="lev_Max_Age" /&gt;
  &lt;/Columns&gt;
  </code></pre>
  
  <p></p>