I have a setup where I have a masterpage with a codebehind. I have another page that is a web file with a user control + codebehind that uses the master page. On the masterpage I have a RadAjaxManager that I am creating dynamically in the PageInit and adding to a placeholder on the masterpage:
Yet when I run the page none of the ajax works at all. I read in another thread that you should create the radajaxmanager in the PageInit and the updated controls in the PageLoad, I tried this as well to no avail. This is inside the PageLoad:
And this is in the PageInit: (using a proxy because I have a RadAjaxManager on the masterpage for this file)
In both these instances absolutely no ajax works on the page. I used to have these controls on the actual page not in the codebehind and everything worked perfectly.
RadAjaxManager RadAjaxManagerMaster = new RadAjaxManager();
RadAjaxManagerMaster.ID = "RadAjaxManagerMaster";
AjaxSetting RadAjaxManagerMasterAjaxSettings = new AjaxSetting();
RadAjaxManagerMasterAjaxSettings.AjaxControlID = "RadContextMenuMaster"; AjaxUpdatedControl RadWindowAjaxControl = new AjaxUpdatedControl(); RadWindowAjaxControl.ControlID = "RadWindowMaster"; AjaxUpdatedControl RadContextMenuAjaxControl = new AjaxUpdatedControl(); RadContextMenuAjaxControl.ControlID = "RadContextMenuMaster"; RadAjaxManagerMasterAjaxSettings.UpdatedControls.Add(RadWindowAjaxControl); RadAjaxManagerMasterAjaxSettings.UpdatedControls.Add(RadContextMenuAjaxControl); RadAjaxManagerMaster.AjaxSettings.Add(RadAjaxManagerMasterAjaxSettings); RadAjaxLoadingPanel RadAjaxLoadingPanelMaster = new RadAjaxLoadingPanel(); RadAjaxLoadingPanelMaster.ID = "RadAjaxLoadingPanelMaster"; RadAjaxLoadingPanelMaster.BackgroundPosition = AjaxLoadingPanelBackgroundPosition.Center; PlaceHolder PlaceHolderCMSAdmin = (PlaceHolder)Shuware.ShuwareCommon.Web.FindControlByID(this.Controls, "PlaceHolderCMSAdmin"); if (PlaceHolderCMSAdmin != null) { PlaceHolderCMSAdmin.Controls.Add(RadAjaxManagerMaster); PlaceHolderCMSAdmin.Controls.Add(RadAjaxLoadingPanelMaster); }Yet when I run the page none of the ajax works at all. I read in another thread that you should create the radajaxmanager in the PageInit and the updated controls in the PageLoad, I tried this as well to no avail. This is inside the PageLoad:
private void CreateAjaxSettings() { RadAjaxManagerProxy RadAjaxManagerProxy = (RadAjaxManagerProxy)Shuware.ShuwareCommon.Web.FindControlByID(this.Controls, "RadAjaxManagerProxy"); AjaxSetting RadAjaxManagerProxyAjaxSettings = new AjaxSetting(); RadAjaxManagerProxyAjaxSettings.AjaxControlID = "RadContextMenuMaster"; AjaxUpdatedControl divCMSContentAjaxControl = new AjaxUpdatedControl(); divCMSContentAjaxControl.ControlID = "divCMSContent"; divCMSContentAjaxControl.LoadingPanelID = "radAjaxLoadingPanel"; AjaxUpdatedControl RadPlaceholderAjaxControl = new AjaxUpdatedControl(); RadPlaceholderAjaxControl.ControlID = "PlaceHolderContentCMS"; AjaxUpdatedControl LabelDebugAjaxControl = new AjaxUpdatedControl(); LabelDebugAjaxControl.ControlID = "LabelDebug"; AjaxUpdatedControl RadWindowAjaxControl = new AjaxUpdatedControl(); RadWindowAjaxControl.ControlID = "RadWindowMaster"; AjaxUpdatedControl RadContextMenuAjaxControl = new AjaxUpdatedControl(); RadContextMenuAjaxControl.ControlID = "RadContextMenuCMS"; RadAjaxManagerProxyAjaxSettings.UpdatedControls.Add(divCMSContentAjaxControl); RadAjaxManagerProxyAjaxSettings.UpdatedControls.Add(RadPlaceholderAjaxControl); RadAjaxManagerProxyAjaxSettings.UpdatedControls.Add(LabelDebugAjaxControl); RadAjaxManagerProxyAjaxSettings.UpdatedControls.Add(RadWindowAjaxControl); RadAjaxManagerProxyAjaxSettings.UpdatedControls.Add(RadContextMenuAjaxControl); RadAjaxManagerProxy.AjaxSettings.Add(RadAjaxManagerProxyAjaxSettings); }And this is in the PageInit: (using a proxy because I have a RadAjaxManager on the masterpage for this file)
RadAjaxManagerProxy RadAjaxManagerProxy = new RadAjaxManagerProxy(); RadAjaxManagerProxy.ID = "RadAjaxManagerProxy"; PlaceHolder PlaceHolderCMSAdmin = (PlaceHolder)Shuware.ShuwareCommon.Web.FindControlByID(this.Controls, "PlaceHolderCMSAdmin"); if (PlaceHolderCMSAdmin != null) { PlaceHolderCMSAdmin.Controls.Add(RadAjaxManagerProxy); }In both these instances absolutely no ajax works on the page. I used to have these controls on the actual page not in the codebehind and everything worked perfectly.