title: Search for text value in sql table and display it in listbox on textbox.textChanged event
body: <p>So basically i have sql table named "Table1" which has columns -nvar(10) Name , float Value and nvar(50) Date, so 3 columns - "Name" "Value" "Date".<br>
  I have textbox1 and listbox1.<br>
  So basically i want to display table data in listbox1 which matches with texbox1 value.So textbox1 is the search area and the result is displayed in the listbox.<br>
  I want to make boolean function which returns true if value of textbox1 matches with any row in the table column and call this function for every row in every columns.</p>
  
  <p>Something like that (loop through table columns and table rows) </p>
  
  <pre><code>   protected void Box3_TextChanged(object sender, EventArgs e)
          {
              string txt = Box3.Text.ToString();
             foreach (clmn in Tablename.columns){
                 foreach(row in Tablename.Rows){
  
                 if(GetSearchResults(txt))
                 {
                  ListBox1.add(txt);
                 }
                 }
             }
  
          }
  </code></pre>
  
  <p>and for GetSearchResults something like that </p>
  
  <pre><code>  public Boolean GetSearchResults(string text) {
  
              SqlConnection connection = new SqlConnection();
              connection.ConnectionString = ConfigurationManager.ConnectionStrings["FatherDB"].ConnectionString;
              connection.Open();
              SqlCommand sqlCmd = new SqlCommand("SELECT *FROM Table1 WHERE Name Like '%@text%' OR Value Like '%@text%'", connection);
              SqlDataAdapter sqlDa = new SqlDataAdapter(sqlCmd);
  
              sqlCmd.Parameters.AddWithValue("@text", text);
              /code here..
              return true;
  
          }
  </code></pre>
  
  <p>I was also thinking about filling invisible Listbox2 with all the table data and then searching in Listbox2 instead of SQL search</p>