如何在会话中记录datareader结果?我读了数据库,然后我读到了想要在Session
分配的值dr = islem.KayitGetir_DataReader("SELECT * FROM products P INNER JOIN products_description PD ON P.products_id = PD.products_id WHERE P.products_id='" + Session[i].ToString() + "'");
if (dr.Read())
{
cartProductImage.ImageUrl = dr["products_thumbnails_images"].ToString();
lblCartProductName.Text = dr["pro_description_name"].ToString();
lblCartProductPrice.Text = dr["products_price"].ToString();
dr.Close();
Session["ProImg"] = cartProductImage;
Session["ProImgName"] = lblCartProductName;
Session["ProImgPrice"] = lblCartProductPrice;
}