protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { lblID.Text = "4"; using (IRoomComponent roomService = new RoomComponent()) { Room room = new Room(); room = roomService.GetRoomByID(int.Parse(lblID.Text)); txtName.Text = room.Name; txtLocation.Text = room.Location; txtCapacity.Text = room.Capacity.ToString(); chkIsEnabled.Checked = room.IsEnabled; } } }