Fix CRM during Partial Postback (UpdatePanel) #6933#6935
Merged
valadas merged 3 commits intodnnsoftware:developfrom Jan 27, 2026
Merged
Fix CRM during Partial Postback (UpdatePanel) #6933#6935valadas merged 3 commits intodnnsoftware:developfrom
valadas merged 3 commits intodnnsoftware:developfrom
Conversation
…Panel) dnnsoftware#6933 This PR restores the logic responsible for handling ScriptManager.RegisterDataItem within the DnnResources control. This logic ensures that JavaScript and CSS resources are correctly sent to the client during a Partial Postback (AJAX), which is critical for WebForms controls running inside an UpdatePanel.
Fix CRM fails to inject JS/CSS assets during Partial Postback dnnsoftware#6933
bdukes
approved these changes
Jan 26, 2026
mitchelsellers
approved these changes
Jan 26, 2026
Contributor
mitchelsellers
left a comment
There was a problem hiding this comment.
Thank you for this!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #6933
DnnResourcesfails to inject JS/CSS assets during Partial Postback (UpdatePanel)Description: It appears that the logic for injecting Client Resources (JS/CSS) during an Asynchronous Postback (Partial Rendering) was overlooked or lost during previous refactoring of the Client Dependency Framework (CDF).
As a result, controls that are dynamically loaded or become visible only after a partial postback (inside an UpdatePanel) fail to initialize because their required scripts are not registered in the browser.
Steps to Reproduce:
Actual Result: The DnnDropDownList control fails to render, and console errors appear (e.g., dnn.createDropDownList is not a function) because the necessary JS files were not loaded.
Expected Result: The ScriptManager should receive the required script tags via RegisterDataItem, allowing the control to initialize correctly.
Fix: Restore missing Client Resource injection logic in DnnResources during Async Postback
Description:
What does this PR do? This PR restores the logic responsible for handling ScriptManager.RegisterDataItem within the DnnResources control. This logic ensures that JavaScript and CSS resources are correctly sent to the client during a Partial Postback (AJAX), which is critical for WebForms controls running inside an UpdatePanel.
Root Cause: Previously, the mechanism to inject resources (using keys like $crm_BodySCRIPTS) existed in ClientResourceLoader but was seemingly lost or not fully ported to DnnResources during recent CDF updates. This caused a regression where controls becoming visible after a postback (e.g., DnnDropDownList in Module Settings) rendered their HTML but lacked their dependency scripts.
Changes:
Modified DnnResources.cs to check if ScriptManager.IsInAsyncPostBack is true.
Restored the logic to package pending JS/CSS resources and register them via ScriptManager.RegisterDataItem, allowing the client-side PageRequestManager to inject them into the DOM.
Verification / Testing:
Open any module using UpdatePanel where a control requires a script resource (e.g., HTML Module Settings -> Page Settings).
Trigger a partial postback that reveals a DnnDropDownList or similar control.
Success: The control renders correctly, and no "undefined function" errors appear in the console.