Click here to Skip to main content
15,896,348 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Whenever I select a dropdownlist it fires selected event changed event of own and also fire a another dropdownlist selected index change.
i have two dropdown one name is ddlflatshop and another one is ddlsoldrent if i select ddlsoldrent then it fires the ddlsoldrent selected event changed.

both have diffrent selected index changed event.


Flat/Shop Name:
ASP.NET
<asp:DropDownList ID="ddlflatshopename" runat="server"  AutoPostBack="true"  CssClass="ddl"
                        onselectedindexchanged="DdlflatshopenameSelectedIndexChanged" Width="200px">



Sold Rent:
ASP.NET
<asp:DropDownList ID="ddlsoldrent" runat="server" CssClass="ddl" Width="200px" 
                             
                             AutoPostBack="True" 
                             onselectedindexchanged="ddlsoldrent_SelectedIndexChanged">
                             <asp:ListItem Selected="True" Value="S">Sold
                        <asp:ListItem Value="R">
Rent


any one help me.why this happen any idea about it...

just give me solution as soon as possible......
thanks..
Posted
Updated 13-Aug-14 21:46pm
v3
Comments
Bhushan Mehetre 14-Aug-14 2:53am    
Is there any relation on this two drop down list... ??
Kornfeld Eliyahu Peter 14-Aug-14 3:54am    
It seems you have a full page post-back every time you select a new value - think about AJAX...
Trung Nguyen Son 14-Aug-14 4:16am    
Pls post your code behind!
Jameel VM 14-Aug-14 5:13am    
please remove the change event code from code behind and again create method by double clicking the two dropdown boxes.

This is because : EnableViewState property set to false.
 
Share this answer
 
Put a control panel around the ddlsoldrent control then add a trigger containing ddlflatshopename's SelectedIndexChanged event.
 
Share this answer
 

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