Click here to Skip to main content
15,885,435 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am Using control ("ascx") and also i have placed it into aspx page
My Issue is

I have 2 dropdown 1 of them fill at page load event and other or second one fill according to value of first dropdown

When i select 1st Drop down It selectedchange event doesnot fired to fill the other 1 .And also its all item get removed
why its happening???

I have set auto postback property true but nothing its workin for me and when i copy all code on page its working(not to place control ascx)
Posted
Comments
Hiren solanki 21-Jan-11 6:25am    
Could you please show us a snippet ?
Sandeep Mewara 21-Jan-11 6:42am    
Is your usercontrol static or dynamically populated at runtime?

1 solution

Are you checking below condition before binding first dropdown?

if(!Page.IsPostBack())
{
DDl.datasource =ds;
DDl.DataBind();
}
 
Share this answer
 
v2
Comments
Abhijit Jana 21-Jan-11 7:19am    
Good Call. Most of the time people forget to put DataBind() with !Page.IsPostBack :)
Anupama Roy 21-Jan-11 9:55am    
Thanks Abhijit!

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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