Click here to Skip to main content
14,976,190 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

"SelectedIndexChanged" event of Dropdownlist is not fired for which data is binded at runtime.

Please explain me what may be the reason, and advise me.

Thanks

K Uday
Posted
Updated 17-Aug-11 22:03pm
v2

Set AutoPostBack property to true for that dropdownlist
   
v3
put the databinding method of dropdown inside !Postback condition
for ex:

C#
Page_Load()
{
if(!IsPostBack)
{
   BindDropDown();
}
}

private void BindDropDown()
{
//Write the databinding logic
}



Also make autopostback property true for dropdown.
   
v2
Comments
Tarun.K.S 18-Aug-11 4:05am
   
Sudesh, use the "code block" to wrap your code.
Kumaraswamy Appula 15-May-13 8:02am
   
thanks for this article it was so helpful for me
Set AutoPostBack="true" .
XML
<asp:DropDownList ID="asp:DropDownList1" AutoPostBack="true" runat="server"  </asp:DropDownList>
   
DropdownList AutoPostBack property must be set true.

for example:

<asp:DropDownList ID="DropDownList1" AutoPostBack="true" runat="server"  </asp:DropDownList>
   

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