Sunday, March 11, 2012

Problem when 2 dropdownlists try to update a label in update panel

I'm not 100% sure on this since I'm learning Atlas like everyone else on this board. Having said that, I think this problem is related to the fact that the two dropdownlist controls do not participate in the callback process (since it's not a typical postback). So, without the ViewState information, the changes you are making (involving resetting of SelectedIndex for the DDL's) are not reflected properly. I'm not sure why this would lead to a particular behavior you're seeing, but chances are, this is the reason.

In a related note, if you include the DDL's within the same ContentTemplate where you have the Label defined, then everything should work properly. Let me know if you find a better explanation for this.
Yes, I did what you suggested and moved the dropdownlists inside theUpdatePanel and now it works. Why do we need those triggers for ?

Unfortunately, in my real world application, I use master pages. When Imoved the page that was working as a stand-alone page to an<asp:Content> section in a master-page context, it stoppedworking. If I change the ScriptManager toEnablePartialRendering="false" it works (I mean the Label valuechanges), but if I set it to "true", it doesn't.

Thank you,
-- EF

No comments:

Post a Comment