-
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
-
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?
-
Re: AJAX with DNN
Welcome to the forums, dromero4. :wave:
Please try to make your posts more relevant. This thread is over a year old now. Thanks!