Question: Using ASP.Net Core MVC 

The site contains multiple drop downs containing Hotels, once the user selects a hotel an Ajax call returns the Hotel Rooms for the selected hotel. The user can select up to 10 hotel + hotel room combinations, so each par of Hotel and Hotel Room drop downs are in a separate partial view.

When I select a Hotel from one of the partial view, all the Hotel drop down move to the same hotel. 

I thought it was something in my javascript, so I commented out every related javascript, except for the call to get hotels. Here is my code:

Partial View

```
@model Cfv3.Models.Vacation.SelectHotelRoom
<select class="hotel-dropdown" name="hotel"></select>
<select class="hotelroom-dropdown" name="hotel"></select>

```

Calling the View

```
<div class="form-horizontal">
    @for (int i = 0; i < Model.IncludedHotels.Count; i++)
    {
        @Html.Partial("_PossibleHotelRoom", Model.IncludedHotels[i])
        <hr/>  
    }
</div>

```

Upon load Ajax loads the hotels

```
$.get('GetHotels', function (data) {
    //console.log(data);
    $.each(data, function (index, value) {
        //console.log(value.id + " " + value.name)
        $('<option>').val(value.id).text(value.name).appendTo('.hotel-dropdown');
    });
});

```

Answer: 
The form I'd like more is probably

```
new_interval = Interval(previous.start, max(current.end, previous.end))

```
This is more Pythonic:

```
start = previous.start
end = max(current.end, previous.end)
new_interval = Interval(start, end)

```