title: How to disable a button after 1st click
body: <p>I have the following onclick event for a button. once this event is ftonired i want to disable the button. Can anyone help me to understand how to do it?</p>
  
  <p>Here is the code i execute on buttonclick event.</p>
  
  <pre><code>protected void Button3_Click(object sender, EventArgs e)
  {
  
      if (Session["login"] != null &amp;&amp; Session["db"] != null)
      {
  
          digit b = new digit();
          String digitformed = b.formdigit(this.DropDownList1, this.TextBox1, this.TextBox2);
  
          chekcount c = new chekcount();
          int count = c.getmaxcountforjud_no(digitformed);
          int addtocount = count + 1;
  
          String name = Session["login"].ToString();
          String databs = Session["db"].ToString();
          String complex_name = name + databs;
  
          if (DropDownList2.SelectedItem.Text != "New")
          {
              update u = new update();
              u.update1(this.Editor1, digitformed, this.TextBox3, complex_name, name, this.DropDownList2);
              Response.Write(@"&lt;script language='javascript'&gt;alert('Updated')&lt;/script&gt;");
  
          }
          else
          {
              save d = new save();
              d.dosave(this.Editor1, addtocount, digitformed, this.TextBox3, complex_name, name);
              Response.Write(@"&lt;script language='javascript'&gt;alert('Saved')&lt;/script&gt;");
  
          }
      }
      else
      {
          Response.Redirect("log.aspx");
      }
  }
  </code></pre>
  
  <p>Here is the Button which i want to disable.</p>
  
  <pre><code>&lt;asp:Button ID="Button3" runat="server" Text="Save" onclick="Button3_Click" 
                      Visible="False" /&gt;
  </code></pre>