protected void btn_RemoveFromCart_Click(object sender, EventArgs e) { if (Session["type"].ToString() == "Student") { int bid = Convert.ToInt32(txt_Bookid.Text); int sid = Convert.ToInt32(Session["loginid"]); LibraryDAL dal = new LibraryDAL(); bool status = dal.RemoveFromCart(bid, sid); if (status == true) { lbl_msg.Text = "not removed from cart"; } else { lbl_msg.Text = "removed from cart"; } } else { lbl_msg.Text = "Admin Cannot Add to Cart"; } }