title: How to automatically detect non-empty textbox?
body: <p>I'm doing a search function for my webapp. </p>
  
  <p>However, i'm trying to disable my search button if the user does not type any search condition in the search box. Unfortunately, i wasn't able to allow my webapp to automatically detect if the user type something in the search box which will eventually enable the search button. Vice versa, when the user delete any search value from the search textbox the button will be enabled again.</p>
  
  <p>This is how i typed to place the condition in my searchbox called txtData but it doesn't work.</p>
  
  <pre><code>    protected void txtData_TextChanged(object sender, EventArgs e)
      {
          if (!txtData.Text.Equals(""))
          {
              btnSearch.Enabled = true;
          }
      }
  </code></pre>
  
  <p>Is there any other way to detect words in textbox?</p>
  
  <p>Regards.</p>