title: How to use dr.GetString() correctly?
body: <p>I have a table which has 4 columns and I want to get only last column rows and show them in  different labels</p>
  
  <pre><code>id   username     useraddress   location  comments
  1    explename    expleaddre1   va        *NULL*
  2    explename2   expleaddre2   ma        mycomments
  3    explename3   expleaddre3   la        mycomments
  4    explename4   expleaddre4   ka        mycomments
  
  
  SqlDataReader dr = cmd.ExecuteReader();
  while (dr.Read())
  {
      lbluserid.Text = Convert.ToInt32(dr.GetString(0)).ToString();
      lblusername.Text = dr.GetString(1);
      lblusertitle.Text = dr.GetString(2);
      lst.Add(unt);
  }
  conn.Close();
  </code></pre>
  
  <p>and I am getting <code>Unable to cast object of type 'System.Int32' to type 'System.String'.</code></p>
  
  <p>I want to use datareader to get comments and show them (except NULL) in label1, label2, label3 ...</p>
  
  <p>I tried to use dr.getstring() but it shows standard errors like outside of the .. , dbnull</p>
  
  <p>Any help appreciated</p>