AjaxControlToolkit and SmartNavigation
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.
July 10th, 2007 at 3:17 am
Rafael, without your post I think I never wouldn’t found this issue on my ASP.NET 2.0 site.
After removing smartnavigation attribute the javascript error disappeared.
Error: Sys.ArgumentTypeException: Object of type ‘AjaxControlToolkit.MaskedEditbehavior’ cannot be converted to type ‘AjaxControlToolkit.MaskedEditbehavior’.
thx,
David
October 29th, 2007 at 12:59 pm
You are my hero! How did you ever determine that smartNavigation was at fault? Probably some nasty trial and error. You’ve got to love unrelated error messages
Thanks,
Joel
November 12th, 2007 at 1:56 pm
Man you saved my mental health with this post!
November 12th, 2007 at 2:54 pm
I’ve had problems with Smartnavigation before, so after I had spent two hours trying to get this fixed to no avail, I decided to remove SmartNavigation and baaaam! everything started working like a dream.
December 10th, 2007 at 1:34 pm
I have been sitting with this problem for months, and now it is solved!!!
:) 
We had many weird errors on our production web and they were basially untraceable…
Thanks!
July 19th, 2008 at 11:37 am
Awesome - thanks for posting this. You are the only person on the internet with the solution to this problem!
July 23rd, 2009 at 4:48 am
Thanks for this post, you save me from a waste of time !
December 5th, 2009 at 10:44 pm
Thanks a lot! Really saved a lot of time for me!