Encountering an issue ... I came across this helpful solution to swap out a partial view within a view. However, upon changing the partial view, the dropdown does not retain the default template CSS. To address this, I utilized the following jQuery code to refresh the CSS:
$("#SelectPicker").selectpicker('refresh');
$("#SelectPicker").selectpicker('render');
Although the CSS is now displaying correctly, the dropdowns are no longer functioning properly after implementing this code. Visual representations of the issue can be found https://i.sstatic.net/LXtIe.png https://i.sstatic.net/nkrD1.png
'code' function GetPartial() {
/* Retrieve the selected value from the dropdown list */
var selectedID = $("#EstateID").val();
/* Fetch the partial view using a .get request */
$.get('/Home/ReturnProSearchPartial/' + selectedID, function (data) {
/* The data variable contains the raw HTML returned from the action method; inject it into the page */
$('#partialPlaceHolder').html(data);
$(document).ready();
$(".SelectPicker").selectpicker('refresh');
$(".SelectPicker").selectpicker('render');
});
}