views:

10

answers:

0

Hi I have an UpdatePanel on my Page with a user control. User control is loaded dynamically via page.Load in PreInit and added to the content of the UpdatePanel:

 protected void Page_Init(object sender, EventArgs e)
 {
            upProductionTask.ContentTemplateContainer.Controls.Add(_opProductionTask);  
 }

This User control includes 2 UpdatePanels (Conditional UpdateMode and ChildrenAsTriggers = false) with several controls on each and some other stuff including a button (let's call it "Search") which is an AsyncPostBackTrigger for these two UpdatePanels. And this User Control is working perfectly when it is not inside the UpdatePanel. The Main update panel which contains UserControl also has some other controls (a dropdown which is populated dynamically via webService call). For this UpdatePanel I have an extenal dropdown on my page which is an AsyncPostBackTrigger for this update panel. The problem rises when I click "Search" Button inside UserControl. It throws an Exception on client side in _onReadyStateChange:

 try {
                _this._webRequest.completed(Sys.EventArgs.Empty);
    }

I googled this problem and it seems that EnableEventValidation should be false. I changed it on my page: the error has gone but still there is no async post back after clicking "Search". So what can be the reason of this strange behavior? Drop Down which is dynamically populeted or some other stuff? And also how can I fix it?