title: get the values of a row in a table with specified id
body: <p>I have a table which contains student first name, last name, class, etc., and each student has his own "student code". I want to enter a "student code" and get back the values of the row with the specified student code.</p>
  
  <p>I searched a lot and I tried to use <code>datarow</code> like <a href="https://stackoverflow.com/questions/20638351/find-row-in-datatable-with-specific-id">this question</a>.</p>
  
  <p>Here's my code: </p>
  
  <pre><code>MySqlConnection connection = new MySqlConnection();
  MySqlCommand cmd = new MySqlCommand();
  DataTable dt = new DataTable();
  
  [WebMethod]
  public string Student_Information(string Student_Code)
  {
      connection.ConnectionString = "server= ; userid= ; password= ; database= ;";
      connection.Open();
  
      string code = Student_Code;
  
      DataRow[] drs = dt.Select("student_code='" + code + "'");
  
      foreach (DataRow dr in drs)
      {
          return "True";
      }
  
      return "False";
  }
  </code></pre>