Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0DNN AJAX IsEnabled Always Returns FalseDNN AJAX IsEnabled Always Returns False
Previous
 
Next
New Post
9/29/2008 1:27 PM
 

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.

 
New Post
9/29/2008 7:15 PM
 

have you made sure that the module you're testing under has the ajax enabled i.e. either has "supports partial rendering" checked in the settings or else has the flag set in the dnn file i.e.

               <supportspartialrendering>true</supportspartialrendering>


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
9/29/2008 8:06 PM
 

My main issue was that I was trying to include the DNN URLControl inside of an UpdatePanel.  It worked fine until I had to upload a file.  It appears that the file upload part won't work inside of an UP because it needs a full postback.

Originally, I didn't use the SupportsPartialRendering, and manually handled the ajax, but now it seems like that file upload will only work if I do use SupportsPartialRendering.  The only thing is, wherever I use it, that ajax progress bar shows up, and I don't necessarily want it showing up all the time.  When I use the partial rendering option in the module definitions, it works fine, with the exception of that progress bar I want to hide.  Is there a way to hide it?

 
New Post
9/29/2008 8:16 PM
 

if you're using a fileupload control it can't be an asyncronous control as it breaks the security model. You'll need to mark it as a postback control i.e. http://msdn.microsoft.com/en-us/library/system.web.ui.scriptmanager.registerpostbackcontrol.aspx

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
9/30/2008 5:30 PM
 

The DNN URLControl does already register the file upload button as a postback control.  The problem is that it doesn't seem to work.  When you call RegisterPostbackControl within DNN, it calls the ScriptManagerType() method inside AJAX.vb:

 

 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.

The problem is that m_Initialized is always somehow set to True, so m_ScriptManagerType never gets set, so DNN doesn't add the necessary ScriptManager tag to enable ajax.  What I did was comment out  the m_Initialized check so it always assigns m_ScriptManagerType.  When I do this, the file upload button (the cmdSave button in the file control) will properly register, and the file uploader works.  It seems like a hack, but I don't know how else to get it working.  If anyone's reading this and needs a more detailed explanation of what I did and why, just ask, and I'll be happy to go into more detail.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0DNN AJAX IsEnabled Always Returns FalseDNN AJAX IsEnabled Always Returns False


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out