title: Like and Dislike button in Gridview. How to implement?
body: <p>I have a gridview that shows User's feedback. Each row has some buttons such as "Like" and "Dislike" and each of which fires  gridview RowCommand Event with specific commandname and commandargument.</p>
  
  <p>If the user clicks on the Like button it should disable the like button and leave the dislike button enabled. If the user changes his mind and clicks the Dislike button it should disable the dislike button and enable the Like button and so on. Any ideas?</p>
  
  <p>I tried this and no luck</p>
  
  <pre><code>protected void BtnLike_Click(object sender, EventArgs e)
  {
      Button thumbs_up = (Button)sender;
      thumbs_up.Enabled = false;
  
      Button thumbs_down = (Button)sender;
      thumbs_down.Enabled = true;
  }
  
  protected void btnDislike_Click(object sender, EventArgs e)
  {
      Button thumbs_down = (Button)sender;
      thumbs_down.Enabled = false;
  
      Button thumbs_up = (Button)sender;
      thumbs_up.Enabled = true;
  }
  </code></pre>
  
  <p>aspx code</p>
  
  <pre><code>&lt;asp:GridView ID="GridViewFeedback" runat="server" CellPadding="4" ForeColor="#333333"
                          GridLines="None" AutoGenerateColumns="False" DataKeyNames="ItemID" AllowPaging="True"
                          AllowSorting="True" DataSourceID="SqlDataSource1" OnRowCommand="GridViewFeedback_RowCommand"
                          Width="100%" OnRowDataBound="GridViewFeedback_RowDataBound"&gt;
                          &lt;AlternatingRowStyle BackColor="White" /&gt;
                          &lt;Columns&gt;                              
                              &lt;asp:TemplateField HeaderText="Item Description" SortExpression="ItemDesc"&gt;                                   
                                  &lt;ItemTemplate&gt;
                                      &lt;asp:Label ID="lblDesc" runat="server" Text='&lt;%# Bind("ItemDesc") %&gt;'&gt;&lt;/asp:Label&gt;
                                  &lt;/ItemTemplate&gt;
                                  &lt;ItemStyle HorizontalAlign="Left" /&gt;
                              &lt;/asp:TemplateField&gt;
                              &lt;asp:TemplateField HeaderText="Like" InsertVisible="False" SortExpression="Vote"&gt;
                                  &lt;ItemTemplate&gt;
                                      &lt;asp:Button ID="BtnLike_Click" runat="server" Text="Like" CommandName="VoteUp" OnClick="BtnLike_Click_Click"
                                          CommandArgument='&lt;%# Bind("ItemID") %&gt;' /&gt;
                                  &lt;/ItemTemplate&gt;
                                  &lt;ItemStyle HorizontalAlign="Center" /&gt;
                              &lt;/asp:TemplateField&gt;
                              &lt;asp:TemplateField HeaderText="Dislike" InsertVisible="False" SortExpression="Vote"&gt;
                                  &lt;ItemTemplate&gt;
                                      &lt;asp:Button ID="btnDislike_Click" runat="server" Text="Dislike" CommandName="VoteDown" OnClick="btnDislike_Click_Click"
                                          CommandArgument='&lt;%# Bind("ItemID") %&gt;' /&gt;
                                  &lt;/ItemTemplate&gt;
                                  &lt;ItemStyle HorizontalAlign="Center" /&gt;
                              &lt;/asp:TemplateField&gt;
  
                      &lt;/asp:GridView&gt;
  </code></pre>