protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { checkHotel(); //to check with the hotel information details } //to show the hotel information details if (Session["emailH"] != null) { Hotel a = (Hotel)Session["emailH"]; tbxHotel.Text = a.Name; tbxEmail.Text = a.OrgEmail; tbxRegID.Text = a.RegID; tbxAddress.Text = a.Address; tbxPcode.Text = a.PostalCode; tbxCity.Text = a.City; tbxCountry.Text = a.Country; tbxPassword.Text = a.Password; tbxContact.Text = a.ContactNo; tbxDesc.Text = a.Description; tbxLicense.Text = a.License; imgHotel.ImageUrl = "../images/" + a.Photo; tbxSrating.Text = Convert.ToString(a.StarRating); } //to show the hotel rooms into the gridview List <Room> rooms = RoomDB.getHotelRoomByCountry(Session["countryName"].ToString(), Session["hotel"].ToString()); gvRoom.DataSource = rooms; gvRoom.DataBind(); }