Ok, I'm stuck. I am trying to use ASP.Net AJAX in a custom module. I have confirmed that my module is accessing AJAX with the following code...
If DotNetNuke.Framework.AJAX.IsInstalled Then
Response.Write("AJAX Installed")
DotNetNuke.Framework.AJAX.RegisterScriptManager()
DotNetNuke.Framework.AJAX.WrapUpdatePanelControl(Me.Panel1, True)
Else
Response.Write("AJAX Not Installed")
End If
And as you can see I register the ScriptManager and attempt to wrap a panel in an UpdatePanel. The Panel has a button and a Label. When you click the button it updates the label to the current date and time. (Standard test code). When I do this, the page does a normal postback. It reloads the whole screen, not just the panel.
I removed the line "DotNetNuke.Framework.AJAX.WrapUpdatePanelControl(Me.Panel1, True)" and try to use an update panel in the page itself. When I do this I get the following error on the page...
Object reference not set to an instance of an object.
The Error in the event viewer reads...
DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at System.Web.UI.PageRequestManager.ProcessUpdatePanels() at System.Web.UI.PageRequestManager.RenderPageCallback(HtmlTextWriter writer, Control pageControl) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Page.Render(HtmlTextWriter writer) at DotNetNuke.Framework.PageBase.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---
Bottom line is, I need to know the proper way to include custom ASP.Net AJAX functionality to my custom module. I would prefer to use as much of the AJAX toolkit as possible since I already know how to use the controls.
Thanks in advance for your help.