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
Miscellaneous
Thread ID:
01193041
Message ID:
01193107
Views:
10
>Jim,
>
>>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?
>
>This was addressed in MM .NET 2.3. The method now looks like this:
>
>
/// <summary>
>/// Overridden to handle the FocusedControl property and fire the localization
>/// for all controls registered on the form.
>/// </summary>
>/// <param name="e">Event arguments</param>
>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 you can't move to 2.3 yet, you can create a subclass of mmBusinessWebPage (for example jdaBusinessWebPage, override the OnPreRender method with the code I have shown above, then specify your pages as subclasses of your jdaBusinessWebPage class.
>
>Best Regards,


That will only solve part of the problem especially if controls are used inside of an UpdatePanel. Microsoft Ajax and UpdatePanel requires that all script code is registered using the new ScriptManager, which pretty much breaks most third party controls that inject script code into the page.

There's more info here:
http://west-wind.com/weblog/posts/10246.aspx

This can be a major PITA for existing controls.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform