I have a bootstrap modal dialog whose content is being dynamically set in button click based on what is selected by the user. I would like to display the selection as bold. However, when rendered it displays the bold tags (less than b greater than) and (less than forward slash b greater than) instead of text being bold.
JS
$("#SubmitBtn").click(function () {
var dropDownText = $("#DSLDropDownList option:selected").text();
$('#ConfirmationDialog').modal('show');
$('#ConfirmationMessage').text('You selected ' + '<b>' + dropDownText + '</b>'
)
-----------------------------------------------------------------------
HTML
<button type="button" id="SubmitBtn" class="btn btn-primary">Submit</button>
<div id="ConfirmationDialog" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div id="ConfirmationMessage"></div>
</div>
</div>
</div>
I would like it to display, You Selected followed by value of dropDownText in bold font. Instead it displays bold tags.