Modal Header and Footer not Rendered RRS feed

  • Question

  • User-173651909 posted

    I have a modal in my _Layout.cshtml like so:

        <!-- Modal -->
        <div class="modal fade" id="feedbackModal" tabindex="-1" role="dialog" aria-labelledby="feedbackModalLabel">
            <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">&times;</span></button>
                        <h4 class="modal-title" id="feedbackModalLabel">Feedback</h4>
                    <div class="modal-body">
                        <div id="feedbackDiv"></div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>

    And I have an Ajax.ActionLink on the nav in _LoginPartial:

    @Ajax.ActionLink("Feedback", "action", "controller", new AjaxOptions()
                    HttpMethod = "GET",
                    InsertionMode = InsertionMode.Replace,
                    UpdateTargetId = "feedbackDiv"
                }, new { @data_target = "#feedbackModal", @data_toggle = "modal" }) 

    This hits an action in the controller and returns a partial view.

    public PartialViewResult FeedbackPartial()
                return PartialView("FeedbackPartial");

    This works and populates the modal, however the header and footer are not rendered. Hit F12 to inspect and the HTML has not been produced. Any ideas as to what's going wrong?

    Thanks in advance

    Monday, February 8, 2016 4:10 PM

All replies