Hi there
I'm having such a nightmare trying to get AJAX to work on a DNN 5.02 web site!
I have an ASCX control packaged as a module, but when it is added to a page, the module cannot load, instead giving a ModuleLoadException:
Object reference not set to an instance of an object. at DotNetNuke.UI.Containers.ActionBase.get_ActionRoot()
The module attempts to run a ToolkitScriptManager from the AjaxControlToolkit v 3.0.20820.16598, but even without any further Ajax controls in the module, the error is generated. I do have NET 3.5 SP1 installed, and the following entry in the DNN web.config <assemblies> section:
<add assembly="AjaxControlToolkit, Version=3.0.20820.16598, Culture=neutral, PublicKeyToken=28F01B0E84B6D53E"/>
which corresponds to the dll installed in the GAC, and I also have a reference to this GAC dll in my VS solution for the control. Additionally, I have tried several suggestions such as running
DotNetNuke.Framework.AJAX.RegisterScriptManager()
in Page_Init and/or Page_Load in the control's code behind, but nothing seems to make any difference to the appearance of the error!
Is there any particular sort of issue that is typically associated with this error? What is DNN trying to tell me about the container - presumably it is referring to the module's container? I'm really stuck about the best way to approach the problem, it just seems like Ajax is a terrible mess as far as DNN is concerned, so can anybody point me in the right direction. What should I have in the web.config if anything, and do I need to put my script manager in a different location?
Thanks very much for your advice.