title: Both DataSource and DataSourceID are defined on 'GridView2'. Remove one definition
body: <p>I am trying to reload a gridview upon date selected from calendar.</p>
  
  <p><em>I know there are duplicate questions on SO but their answers did not work for me</em></p>
  
  <pre><code> protected void Calendar1_SelectionChanged(object sender, EventArgs e)
  {
      Label1.Text = Calendar1.SelectedDate.ToShortDateString();
          DataSet ds = dlObj.FillDataSet("SELECT top 5  [DName], [bloodGroup], [dateDonated] FROM [tblDonors] ORDER BY [dateDonated] DESC ", "tblDonors");
          GridView2.DataSource = ds;
  
          GridView2.DataBind();
  
          }
  </code></pre>
  
  <p>And the method FillDataSet() is this</p>
  
  <pre><code>public DataSet FillDataSet(string q, string tableName)
  {
      DataSet ds = new DataSet();
      try
      {
          SqlDataAdapter da = new SqlDataAdapter(q, thisConnection);
          da.Fill(ds, tableName);
          return ds;
      }
      catch (Exception)
      {
          return ds;
      }
  }
  </code></pre>
  
  <p>When I click any date, this error occurs</p>
  
  <pre><code>Both DataSource and DataSourceID are defined on 'GridView2'.  Remove one definition.
  </code></pre>