I am trying to return a modal from my controller post action of a previous modal. The issue I am having is that the partial view is not rendered as a modal. All the documentation I can find refers to opening a modal from a button, however my modal is conditional so I want the controller to handle whether or not to load the modal / which modal to load
Part of partial view where I return the view containing the modal
return PartialView("_AccountUpdateSuccess");
My View
<div class="modal fade" tabindex="-1" role="dialog" id="updateSuccess">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">Success!</h4>
</div>
<div class="modal-body">
<p class="text-success">@ViewBag.Account has been updated successfully!</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<script type="text/javascript">
$(document)
.ready(function() {
$("#updateSuccess").modal('show');
});
</script>