Link to home
Start Free TrialLog in
Avatar of Varshini
Varshini

asked on

How do refresh the page when selecting the drop list item ?

i have the drop down list with following values assigned to it.
19/02/1974
20/02/1974
21/02/1974

19/02/1974 is the first item in the drop list  and it assigning default in page loading.
SelectedIndexChanged is not working when i select the value 19/02/1974 but the the event is firing for selecting other values.  

SelectedIndexChanged event should work when i choose the 19/02/1974 . How to Achieve this ?
<asp:DropDownList ID="myDate" runat="server" AutoPostBack="True"  Width="97px" OnSelectedIndexChanged="myDate_SelectedIndexChanged">
                         
                            </asp:DropDownList>
ASKER CERTIFIED SOLUTION
Avatar of disrupt
disrupt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Snarf0001
If you have it populating on page load, then SelectedIndexChanged isn't going to fire when you select that value again, because the index hasn't changed.  Its still the same item.

Either add a --Select One-- record as the first itme in the drop down list, or optimally just load the '19/02/1974' page data on page load as well.
No reason to post back for a load, if you know that's already going to be the default value.