As title, in C#, I was wondering that if I selected the same index in a dropdownlist, how could I trigger the function (OnSelectedIndexChanged)?
<asp:DropDownList ID="ddlColor" runat="server" Width="100%" AutoPostBack="True" OnSelectedIndexChanged="ddlColor_SelectedIndexChanged" >
<asp:ListItem Selected="True" Value="White"> White </asp:ListItem>
<asp:ListItem Value="Silver"> Silver </asp:ListItem>
<asp:ListItem Value="DarkGray"> Dark Gray </asp:ListItem>
<asp:ListItem Value="Khaki"> Khaki </asp:ListItem>
<asp:ListItem Value="DarkKhaki"> Dark Khaki </asp:ListItem>
</asp:DropDownList>
There is a scenario as below following:
I selected "White" at first, and it triggered ddlColor_SelectedIndexChanged successfully.
Then as need I selected "White" again, how could I trigger the function ddlColor_SelectedIndexChanged again?