开发者

Extender controls may not be registered after PreRender

I am creating Dynamic UserControls with Dynamic AjaxControls. Then I store each of the UserControls in a Collection. On Postback I recall the UserControls in the collection to Re-Create the interface. It works if i only use Standard HTML controls but does NOT work with AJAX controls. I get this error on PostBack Extender controls may not be registered after PreRender. So far I have tried the following:

  1. MyBase.OnPreRender(e) in Page and Usercontrol
  2. EnsureChildControls() in the OnInit
  3. Added ScriptManager to the MasterPage None of this stuff is working...

If I re-create all the controls including the ones inside the usercontrol then i get no error however it takes forever to do a postback as opposed to just recalling the collection of UserControls.

Stack Trace:

at System.Web.UI.ScriptControlManager.RegisterExtenderControl[TExtenderControl](TExtenderControl extenderControl, Control targetControl)

at System.Web.UI.ScriptManager.RegisterExtenderControl[TExtenderControl](TExtenderControl extenderControl, Control targetControl)

at System.Web.UI.ExtenderControl.RegisterWithScriptManager()

at System.Web.UI.ExtenderControl.OnPreRender(EventArgs e)

at AjaxControlToolkit.ExtenderControlBase.OnPreRender(EventArgs e) in d:\hg\act\Server\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs:line 365

at AjaxControlToolkit.DropDownExtender.OnPreRender(EventArgs e) in d:\hg\act\Server\AjaxControlToolkit\DropDown\DropDownExtender.cs:line 157

at System.Web.UI.Control.PreRenderRecursiveInternal()

at System.Web.UI.Control.PreRenderRecursiveInternal()

at System.Web.UI.Control.PreRenderRecursiveInternal()

at 开发者_开发问答System.Web.UI.Control.PreRenderRecursiveInternal()

at System.Web.UI.Control.PreRenderRecursiveInternal()

at System.Web.UI.Control.PreRenderRecursiveInternal()

at System.Web.UI.Control.PreRenderRecursiveInternal()

at System.Web.UI.Control.PreRenderRecursiveInternal()

at System.Web.UI.Control.PreRenderRecursiveInternal()

at System.Web.UI.Control.PreRenderRecursiveInternal()

at System.Web.UI.Control.PreRenderRecursiveInternal()

at System.Web.UI.Control.PreRenderRecursiveInternal()

at System.Web.UI.Control.PreRenderRecursiveInternal()

at System.Web.UI.Control.PreRenderRecursiveInternal()

at System.Web.UI.Control.PreRenderRecursiveInternal()

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜