Click here to Skip to main content
16,016,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi guys ,
i have a one dropdown list ,when i select first item(Followup)
OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" is not firing .. please help me guys 


ASP.NET
<asp:DropDownList ID="ddlprocess" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
                               <asp:ListItem>FollowUp</asp:ListItem>
                                <asp:ListItem>Appointment</asp:ListItem>
                                <asp:ListItem>Closed</asp:ListItem>
                            </asp:DropDownList>


help me ..
thanks . .
Posted

set AutoPostBack property to true of DropDownList1 in .aspx file
AutoPostBack="True"
 
Share this answer
 
v2
just try to rename your selection change method in code behind from DropDownList1_SelectedIndexChanged to ddlprocess_SelectedIndexChanged also the mark up as OnSelectedIndexChanged="ddlprocess_SelectedIndexChanged">

Hope this helps
 
Share this answer
 
Comments
u mani 13-Aug-14 2:30am    
dear Jammel vm,thank s for reply: that is not a problem .. when i select first item it is not firing ,if select 2nd or 3rd item the event was firing .. please tell me how to fire the event when i select first item
Jameel VM 13-Aug-14 2:37am    
Just add a dummy ListItem to the start of the DropDownList and set that item's Enabled property to false. i.e. <asp:ListItem Value="" Text="" Enabled="false" />
<asp:ListItem Value="1" Text="Item 1" />
u mani 13-Aug-14 2:44am    
there is no other solution .. with out adding dummy item ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900