title: C# - TextBox TextChanged event not firing
body: <p>I'm currently working on a project at work and for some reason the textchanged event of my textbox isn't firing. I've tried to put a breakpoint in my code but he doesn't get there so he the event isn't firing imo.</p>
  
  <pre><code>&lt;FooterTemplate&gt;
                  &lt;asp:TextBox ID="TextBoxSiteAlias" runat="server" AutoPostBack="true" OnTextChanged="TextBoxSiteAlias_TextChanged"&gt;&lt;/asp:TextBox&gt;
                  &lt;ajaxToolkit:AutoCompleteExtender
                                      runat="server" 
                                      id="AutoCompleteExtenderSiteAlias" 
                                      targetcontrolid="TextBoxSiteAlias"
                                      servicemethod="GetSiteAliasList"
                                      minimumprefixlength="2" 
                                      completioninterval="1000"
                                      enablecaching="true"
                                      completionsetcount="12" /&gt;
              &lt;/FooterTemplate&gt;
  </code></pre>
  
  <p>This is my FooterTemplate in my Gridview.</p>
  
  <pre><code>protected void TextBoxSiteAlias_TextChanged(object sender, EventArgs e)
      {
          string query = @"select distinct (isnull([site_address1], '')
                              +isnull([site_address2], '')
                              +isnull([site_address3], '')
                              +isnull([site_address4], '')
                              +isnull([site_address5], '') ) as 'Site_adresse' ,
                            city,
                            country,
                            [site_id] as 'siteID'
                            FROM [Henkel].[dbo].[tbl_Henkel_site_info_upload]
                            WHERE site_id = '" + ((TextBox)GridView1.FooterRow.FindControl("TextBoxSiteAlias")).Text + "'";
          conn.Open();
          SqlCommand cmd = new SqlCommand(query, conn);
          SqlDataReader myReader = cmd.ExecuteReader();
          DataTable myTable = new DataTable();
          myTable.Load(myReader);
          conn.Close();
          if (myTable.Rows.Count &gt; 0)
          {
              ((TextBox)GridView1.FooterRow.FindControl("TextBoxSiteAddress")).Text = Convert.ToString(myTable.Rows[0]["Site_adresse"]);
              ((TextBox)GridView1.FooterRow.FindControl("TextBoxSiteCity")).Text = Convert.ToString(myTable.Rows[0]["city"]);
              ((TextBox)GridView1.FooterRow.FindControl("TextBoxSiteCountry")).Text = Convert.ToString(myTable.Rows[0]["country"]);
              ((TextBox)GridView1.FooterRow.FindControl("TextBoxIBSSiteID")).Text = Convert.ToString(myTable.Rows[0]["siteID"]);
          }
          else
          {
              ((TextBox)GridView1.FooterRow.FindControl("TextBoxSiteAddress")).Text = "";
              ((TextBox)GridView1.FooterRow.FindControl("TextBoxSiteCity")).Text = "";
              ((TextBox)GridView1.FooterRow.FindControl("TextBoxSiteCountry")).Text = "";
              ((TextBox)GridView1.FooterRow.FindControl("TextBoxIBSSiteID")).Text = "";
          }
      }
  </code></pre>
  
  <p>This is the function that should be called as soon as the dedicated textbox looses focus.</p>
  
  <p>I've been searching for a reason on many forums but all those replies indicated that the textbox needs the AutoPostBack property (which mine has).</p>
  
  <p>Small notice: I have the same project (with all the same functionalities for another deal of our company and in that project it works fine. I have copied that projects code to the new project and changed all the queries + connectionstrings)</p>
  
  <p>Hopefully someone can help me on this? :)</p>
  
  <p>Thanks a lot</p>
  
  <p>Kevin</p>