I have installed AJAX for ASP.NET for use with DNN 4.8.2, but it seems that DNN won't recognize that I have it installed or enabled. I updated the web.config in the proper places, and yet, it always thinks it's not installed or enabled. In the IsEnabled() method in AJAX.vb in the DotNetNuke library:
Public Shared Function IsEnabled() As Boolean
If HttpContext.Current.Items("System.Web.UI.ScriptManager") Is Nothing Then
Return False
Else
Return CType(HttpContext.Current.Items("System.Web.UI.ScriptManager"), Boolean)
End If
End Function
HttpContext.Current.Items("System.Web.UI.ScriptManager") is always nothing. Does anyone know exactly how this stuff works?
Also, in my debugging the source to figure out what's going on, the method ScriptManagerType() gets called a lot, which always seems to return false also.
Private Shared Function ScriptManagerType() As Type
If m_ScriptManagerType Is Nothing Then
If Not m_Initialized Then
m_ScriptManagerType = Reflection.CreateType("System.Web.UI.ScriptManager", True)
End If
m_Initialized = True
End If
Return m_ScriptManagerType
End Function
When I debug, even when I start from navigating to the DNN site, m_Initialized is already set to true and that it'll always be set to true, so m_ScriptManagerType never ever gets set. The m_Initialized variable only seems to be used in ScriptManagerType(), so I can't think of anything else that would mess with that variable. Is anyone running into problems having the AJAX class properly reporting whether AJAX is actually installed? I've been tearing my hair out over this.