protected void resetRoomNums() { if (lCAL.SelectedDate != null && fCAL.SelectedDate != null) { numDRP.Items.Clear(); int num = thisRm.numAvailable(lCAL.SelectedDate, fCAL.SelectedDate); if (num <= 0) { ListItem newItem = new ListItem(); newItem.Text = NO_ROOMS; newItem.Value = NO_ROOMS; numDRP.Items.Add(newItem); } else { for (int x = 1; x <= num; x++) { //Populating the number of rooms list ListItem newItem = new ListItem(); newItem.Text = x.ToString(); newItem.Value = x.ToString(); numDRP.Items.Add(newItem); } } } }