On my client's site, I have on one page a DropDownList with the months of the year. Unfortunately, the value property is written in months rather than numbers.
<asp:DropDownList ID="ddlMesReajuste" runat="server" AppendDataBoundItems="true">
<asp:ListItem Value="" Text="Selecione o mês de reajuste" Selected></asp:ListItem>
<asp:ListItem Value="Janeiro" Text="Janeiro"></asp:ListItem>
<asp:ListItem Value="Fevereiro" Text="Fevereiro"></asp:ListItem>
<asp:ListItem Value="Março" Text="Março"></asp:ListItem>
<asp:ListItem Value="Abril" Text="Abril"></asp:ListItem>
<asp:ListItem Value="Maio" Text="Maio"></asp:ListItem>
<asp:ListItem Value="Junho" Text="Junho"></asp:ListItem>
<asp:ListItem Value="Julho" Text="Julho"></asp:ListItem>
<asp:ListItem Value="Agosto" Text="Agosto"></asp:ListItem>
<asp:ListItem Value="Setembro" Text="Setembro"></asp:ListItem>
<asp:ListItem Value="Outubro" Text="Outubro"></asp:ListItem>
<asp:ListItem Value="Novembro" Text="Novembro"></asp:ListItem>
<asp:ListItem Value="Dezembro" Text="Dezembro"></asp:ListItem>
</asp:DropDownList>
I needed this Dropdown to "go away" with a couple of months of options. For example, today is 21/6. So I should only have access to the options from August onwards. But by the time I get past 10/7, I'd have access to options from September onwards.
That is, the options are always from the next month on (if we are before the 11th of the current month) and two months after the current one for if we are from the 11th until the last day of the current month.
Of course for the month of November, it would only be December if we were before 11/11. And for December, every month would be available, minus the January if we were on 11/1.
I know it sounds kind of complicated, but I was not sure how to do anything about it because it's not possible to put ID in the ListItems and also because the Values of the items are the months written.
What could I do?