I have a web application built with ASP.NET that utilizes bootstrap as the frontend framework. To manage the libraries I'm using, I am bundling them using the ScriptBundle
method shown below:
bundles.Add(new ScriptBundle("~/bundles/masterPageScripts").Include(
"~/Theme/plugins/jQuery/jQuery-2.2.0.min.js",
"~/Theme/bootstrap/js/bootstrap.min.js",
"~/Scripts/bootstrap-select.min.js",
....
));
Additionally, I have implemented a ListView
within an UpdatePanel
to prevent the entire page from refreshing when interacting with it. The ListView has the following structure:
https://example.com/image1.jpg
Upon clicking the "+" icon, the dropdownlist disappears, as illustrated in the image below:
https://example.com/image2.jpg
I have attempted to reload the bundles
within the pageLoad
function but have not had success so far.
<script type="text/javascript>
// Reload js on partial postback
function pageLoad(sender, args) {
if (args.get_isPartialLoad()) {
jQuery.ajax({
type: "GET",
url: '<%: Scripts.Url("~/bundles/masterPageScripts") %>',
dataType: "script",
cache: true
});
}
}
</script>
Does anyone have any suggestions or solutions?