Archive for the ‘.NET’ Category

ModalPopupExtender hiccup with Safari and Chrome

Wednesday, November 11th, 2009

I don’t write much, as you can see by the dates on my posts. But I want to make sure to register this here, so people can easily find a solution to this problem instead of spending hours trying different things.For some reason, my modal popup was not displaying in Safari/Chrome.The fix is to replace ScriptManager with AjaxToolKitScriptManager.Replace:<asp:ScriptManager ID=”scriptManager” runat=”server” />With this:<ajaxToolkit:ToolkitScriptManager ID=”scriptManager” runat=”server” ></ajaxToolkit:ToolkitScriptManager>I hope this helps,

AjaxControlToolkit and SmartNavigation

Tuesday, May 22nd, 2007

After spending almost 2 hours investigating the following problem with a Ajax dropdown extension object:

‘Error: Sys.ArgumentTypeException: Object of type ‘AjaxControlToolkit.PopupBehavior’ cannot be converted to type ‘AjaxControlToolkit.PopupBehavior’.

I finally realized the page was using the smartNavigation directive. This directive has become obsolete with .NET 2.0, you can now use Page.SetFocus() and
Page.MaintainScrollPositionOnPostBack() instead to obtain similar result. However, during the upgrade process from 1.1, the wizard didn’t flag this directive as a problem, so
I was not aware of its presence until I came across the problem above.
 
Anyway, I was not surprised that upon removing this directive, the page was no longer throwing the javascript exception.

Lesson learned.