title: how to retrieve integer value from database & store it in integer in .net
body: <pre><code>protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
  {
  
     SqlCommand cmd = new SqlCommand();
      cmd.CommandType = CommandType.Text;
      cmd.CommandText = "select FromYear from Factory where Cal_ID='" + DropDownList1.SelectedItem.Text + "'";
      cmd.Connection = con;
      con.Open();
      dr = cmd.ExecuteReader();
      dr.Read();
      d = dr[0].ToString();
     //d =(string) Label4.Text;
      con.Close();
  
    }
  </code></pre>
  
  <p>I want integer value from database </p>