Wednesday, March 21, 2012

DropDownList causes a full page postback instead of only updating the UpdatePanel

I have a code for updating a DropDownList with items whenever another DropDownList triggers a SelectedIndexChanged event.

When I select an item in the DDLSelect dropdown, it causes a full page postback instead of just updating the UpdatePanel. This problem only occurs when I try to implement it in an existing project, and it works fine when if I try it in a new project.

I've updated my Web.config file to make my project compatible with AJAX, so I don't believe that's the problem.

I should add that I'm trying to use this inside an ascx UserControl file, so maybe there are known issues there.

Thanks in advance.

Please post the usercontrol code

OK, problem solved!

It was the Web.config after all. I had this line which caused the problem:

<

xhtmlConformancemode="Legacy"/>

I removed it and everything is fine.

Cheers.

No comments:

Post a Comment