title: How to make link button on grid view invisible when I click on it?
body: <p>I have a grid view with link buttons. When clicking on it, I want to perform some operation, and also need to make the clicked link button invisible. How to make it invisible?</p>
  
  <p>My code:</p>
  
  <pre><code> &lt;asp:TemplateField ShowHeader="true" HeaderText="Theory"&gt;
        &lt;ItemTemplate&gt;
             &lt;asp:LinkButton ID="lb_theory" runat="server" CausesValidation="false" CommandArgument='&lt;%#Eval("student_id")%&gt;' OnClientClick="this.disabled = true; "   CommandName="theory_remove" Text="Remove"  
  command = "lnk_Click" &gt;&lt;/asp:LinkButton&gt;
        &lt;/ItemTemplate&gt;
        &lt;/asp:TemplateField&gt;
              &lt;asp:TemplateField ShowHeader="true" HeaderText="Practical"&gt;
                   &lt;ItemTemplate&gt;
                        &lt;asp:LinkButton ID="lb_practical" runat="server" CausesValidation="false" 
                                  CommandArgument='&lt;%#Eval("student_id")%&gt;'   CommandName="practical_remove" Text="Remove"&gt;&lt;/asp:LinkButton&gt;
                   &lt;/ItemTemplate&gt;
        &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p>and </p>
  
  <pre><code>protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
  {
       if (e.CommandName == "theory_remove")
       {
           string st_id = Convert.ToString(e.CommandArgument.ToString());
           string t_id = (string)Session["test"];
           SqlConnection con = obj.getcon();
           con.Open();
           string theory_state = "0";
           SqlCommand cmd = new SqlCommand("update student_vs_testsession_details set theory='" + theory_state+ "' WHERE student_id='" + st_id + "' and testsession_id='" + t_id + "'", con);
           int temp = cmd.ExecuteNonQuery();
       }
  }
  </code></pre>