Hi everybody,
I have a real weird behaviour on a control with Ajax (seems to be the cause) :
I have a UserControl, developped without taking care of Ajax thing. It works fine when placed in a basic Page, but it does not work at all when integrated in the global application we are developping.
There are some combos in my control, selecting an item in the first one set the values of the two other and add some controls in the page. Selecting an item on the two other applies a filter on the possible values of the first one and unselect (and remove additionnal controls). So i have a postback event launched on each combo selection changed.
The difference between the two contexts is mostly that control is dynamically loaded in a PlaceHolder (placed in a UpdatePannel) during CreateChildControls step in the application.
The issue is that in the application, the UserControl initializes fine, but here is what happens next :
1 - I select a value in the first DDL : it works fine.
2 - I select another value, no matter what DDL : It fires multiple events, and sometimes not the one which rised the postback. So my control have an heratic behaviour.
Any idea for the reason ?
Thanks for your help.
It sounds very strange to trigger multiply events at the same time.Try to specify asynchronous?post?back?for?the?DropDownLists?in?a?asp:UpdatePanel.If you place a user control in a asp:UpdatePanel in a web form,try to set the postback ControlID = User control ID.
If you still have any question about multiply triggered events of the DropDownlists,try to post some codes. I'd like to check it.
No comments:
Post a Comment