title: DataRow row = dt.Rows[0]; //There is no row at position 0 indexoutofrangeexception
body: <pre><code>SqlConnection con1 = new SqlConnection(ConfigurationManager.ConnectionStrings["GVRAgencyConnectionString1"].ConnectionString);
              con1.Open();
              SqlDataAdapter da = new SqlDataAdapter("select      weight,mrp_pack,no_of_pack,mrp_master_pack from dbo.purchase_order where   product_ID=@product_ID",con1);
              da.SelectCommand.Parameters.AddWithValue("@product_ID", DropDownList3.Text);
              DataTable dt = new DataTable();
              da.Fill(dt);
              con1.Close();           
              DataRow row = dt.Rows[0];
              txtwgt.Text = row["weight"].ToString();
              txtmrpsinglepack.Text = row["mrp_pack"].ToString();
              txtnoofmasterpack.Text = row["no_of_pack"].ToString();
              txtmrpmaster.Text = row["mrp_master_pack"].ToString();
  </code></pre>