Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have two dropdownlists:- "ddl1" and "ddl2". "ddl2" is populated on selectedindexchange event of "ddl1" i.e. at runtime. "ddl1" and "ddl2" both have Autopostback="true". "ddl2" also has selectedindexchange event handled. But when I try to select an item in "ddl2" it refreshes the page and it shows the 1st item in the "ddl2". I have searched it on the internet and tried various things like putting "ddl2" in update panel, and handling prerender event of pagelifecycle, but they didn't help. Please provide some solution. It is required for my project. Please help

What I have tried:

I have searched it on the internet and tried various things like putting "ddl2" in update panel, and handling prerender event of pagelifecycle, but they didn't help. I have also tried setting enableviewstate="True" and ViewStateMode="Enabled" without any luck.
Posted
Updated 30-Dec-16 4:23am

1 solution

I suspect you have not checked the IsPostBack property in Page Load. Check that out.
 
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