title: implementing a search function
body: <p>I'm trying to implement a search function for my gridview. My codebehind looks like this</p>
  
  <pre><code>protected void ButtonSearch_Click(object sender, EventArgs e)
      {
          string title = TextBoxSearchTitle.Text;
          string artist = TextBoxSearchArtist.Text;
          string genre = DDLSearch.SelectedValue;
          if (genre == "Alle")
          {
              return;
          }
          else
          {
              SqlDataSource1.FilterExpression = String.Format("Title LIKE '%{0}%' AND Artist LIKE '%{1}%' AND Genre ='{2}'", title, artist, genre);
              //figure out if table will be empty and do something...
  
          }
      }
  </code></pre>
  
  <p>and is running without problems so far. Only thing i dont like is when the search doesnt have any results there is no gridview shown. I want to either show an empty gridview in that case and a message "No results" or something or just a message. But i cant figure out how to  determine whether my sqldatasource object is empty or not with that filterexpression. So please help me on that one.</p>
  
  <p>And also is it possible to show an empty gridview to the user if the filter expression results in an empty sqldatasource?</p>
  
  <p>thanks in advance!</p>