Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error with AJAX Extender controls and MM
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Error with AJAX Extender controls and MM
Miscellaneous
Thread ID:
01193041
Message ID:
01193041
Views:
80
I added the new ASP.Net AJAX 1.0 library that Microsoft just released to my website that is based on the Mere Mortals Framework. I also added all of the necessary keys to my web.config. Some of the AJAX controls work fine on my web pages, but when I try to add any of the Extender controls to a form based on mmBaseWebPage, I get the following error:
Message: Extender controls may not be registered before PreRender. 
Call Stack:    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:\E\AjaxControlToolkit\Release\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs:line 370 
   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) 
It looks like the problem may be due to the fact that mmBaseWebPage.OnPreRender() doesn't always call base.OnPreRender (e). Does anyone know if this was changed in MM 2.2 or 2.3?
protected override void OnPreRender(EventArgs e)
		{
			if (this.FocusedControl != null && this.FocusedControlID != "") 
			{
				this.RegisterStartupScript("FocusedControl","<script language='javascript'>\r\ndocument.getElementById('" + this.FocusedControlID + "').focus();\r\n</script>\r\n");
				base.OnPreRender (e);
			}

//			if (mmAppBase.Localize) 
//			{			
//				// *** Causes the form to localize
//				this.OnLocalize(this.CurrentLanguage);
//			}
		}
Next
Reply
Map
View

Click here to load this message in the networking platform