CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: AJAX with DNN

  1. #1
    Join Date
    Mar 2002
    Location
    Colorado
    Posts
    105

    AJAX with DNN

    Hello,

    I have an AJAX rating control in an update panel on my form. The control is working fine except when I switch user logins, or navigate to different pages within my DNN site. The rating control is placed in an update panel on an .ascx web control. I register the script manager in the page load event.

    If DotNetNuke.Framework.AJAX.IsInstalled Then
    DotNetNuke.Framework.AJAX.RegisterScriptManager()
    End If
    When I navigate to a seperate page within the site, and come back to my rating page, the graphics contained in the rating control have disappeared. It still allows me to click the control though.

    I stepped into the code, and when the line DotNetNuke.Framework.AJAX.IsInstalled is hit anytime after I navigate away from my module page (poll.ascx), the isInstalled value is then set to False, and RegisterScriptManager method is not called.

    Thanks in advance for any advice on this!

    Larry

  2. #2
    Join Date
    Aug 2008
    Posts
    1

    Re: AJAX with DNN

    Hi,

    You might try using a different stage in the page lifecycle:

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init

    If DotNetNuke.Framework.AJAX.IsInstalled Then
    DotNetNuke.Framework.AJAX.RegisterScriptManager()
    End If

    I actually have a very similar problem. I am using the ajax rating control in DNN as well, athough I implemented it inside of a custom control. When I use the DNN RegsiterScriptManager() I receive the following error:

    DotNetNuke.Services.Exceptions.PageLoadException: The control with ID 'RatingControlUpdatePanel' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it. --->

    The one thing that I do know for sure is that my control is solid. I've tested and retested the control outside of DNN and it works great. There were known issues with the ATLAS ScriptManager in DNN versions 4.5 and earlier but I am using 4.81 and am flabbergasted as to why this simple bit of code is not working?

    What are you using your control for? Any other thoughts on this cursed scriptmanager?

  3. #3
    Join Date
    May 2002
    Posts
    10,943

    Re: AJAX with DNN

    Welcome to the forums, dromero4.

    Please try to make your posts more relevant. This thread is over a year old now. Thanks!
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured