title: Can i bind same datareader object to 2 controls?
body: <p>I am trying to bind same data reader object to 2 controls .one is gridview and second is formview.The gridview is getting bind but it formview didn't .Even i am closing the  object after binding both.
  Can anyone please let me know if it is possible or not.If yes then how?</p>
  
  <p>This is my code:-</p>
  
  <pre><code>   SqlConnection con = new SqlConnection(getconnectionstring());
     SqlCommand cmd = new SqlCommand();
      SqlCommand cmd1 = new SqlCommand();
  
     //cmd.CommandText = "SELECT firstname,lastname FROM crudtable";  
      cmd.CommandText = "SELECT firstname,lastname FROM crudtable";
      cmd1.CommandText = "SELECT firstname FROM crudtable";
  
      cmd.Connection = con;
      cmd1.Connection = con;
  
      con.Open();
  
      SqlDataReader reader ;
      SqlDataReader reader1;
  
      reader = cmd.ExecuteReader();
      GridView1.DataSource = reader;
      GridView1.DataBind();
  
      FormView1.DataSource = reader;
      FormView1.DataBind();
      reader.Close();
      reader1 = cmd1.ExecuteReader();
      ddl.DataSource = reader1;
      ddl.DataTextField = "firstname";
      ddl.DataBind();
  </code></pre>
  
  <p>Thanks in advance.</p>