title: GridView doesn't refresh LINQ to XML data?
body: <p>If have a Xml-file with 3 entries</p>
  
  <p>Country Name="Denmark" InternetTLD="dk" </p>
  
  <p>Country Name="Holland" InternetTLD="nl"</p>
  
  <p>Country Name="Greate britain" InternetTLD="uk"</p>
  
  <p>In my web-page if have a textbox, gridview and xmlDataSource.
  When I don't specify anything in the textbox then all three countries are are loaded using a LINQ query into the xmlDataSource and then displayed in the gridview. 
  But when I specify for example 'Denmark' in the textbox then I keep on seeing all 3 records whereas the count property of the LINQ query says 1 and the Data-property of the xmlDataSource shows only 1 country as well (Denmark) as it should be.</p>
  
  <p>Problem is that the gridView doesn't seem to refresh the new data???</p>
  
  <p>Here's my code:</p>
  
  <pre><code>    protected void Page_Load(object sender, EventArgs e)
      {
          QueryXml();
      }  // Page_Load()
  
  
      private void QueryXml()
      {
          XElement _countries = XElement.Load(Server.MapPath(COUNTRIES_XML));
          IEnumerable&lt;XElement&gt; query = null;
  
          // extract all countries
          if (txtCountry.Text == "" || txtCountry.Text == "*")
          {
              query = from c in _countries.Elements()
                      select c;
          }
          else
          {
              // Extract all elements where Name has been specified
              query = from c in _countries.Elements()
                      where c.Attribute("Name").Value.ToString().StartsWith(txtCountry.Text, StringComparison.CurrentCultureIgnoreCase)
                      select c;
          }
  
          // Set xml filtered string data source
          xmlDsCountries.Data =
              "&lt;Countries&gt;" +
              string.Join("", query.Select(country =&gt; country.ToString())) +
              "&lt;/Countries&gt;";
          // set the data source of the gridview
          gdvwCountries.DataSource = xmlDsCountries;
          // Show the data
          gdvwCountries.DataBind();
  
          lblMsg.Text = query.Count().ToString();
      }  // QueryXml()
  </code></pre>
  
  <p>Why isn't the gridView refreshing?</p>
  
  <p>thank you</p>
  
  <p>Chris</p>