protected void btnGiveFeedback_Click(object sender, EventArgs e) { //Recording the feedback when user clicked to add feedback pnlFeedback.Visible = false; //Retrieving the clicked feedback panel ItemBooking item = (ItemBooking)Session["retrieve"]; Review review = new Review(); //Receiving the written comment and rating to add in the database review.Date = DateTime.Now; review.Time = DateTime.Now; review.Feedback = tbxComment.Text; review.Rating = Convert.ToInt32(tbxRatings.Text); review.ReportStatus = ddlHotel.SelectedItem.Text; review.HotelID = item.RoomID.Hotel; Customer c = (Customer)Session["user"]; review.CustEmail = c; //Adding feedback with method int add = ReviewDB.addReviewRoom(review); lbladded.Visible = true; //Displaying message to inform user lbladded.Text = "Feedback submitted successfully! Thanks for your feedback................"; }