以下の Ajax.ActionLink には、空の AjaxOptions があります。驚くべきことに、それは自動的に ajax レスポンスをモーダルにレンダリングし、.modal-body 要素全体を置き換えます。私の意図は、応答を #ItemCommentModalBody div にレンダリングすることです。UpdateTargetId と InsertionMode をどのように設定しても、AjaxOptions が空の場合でも、.modal-body div 全体が応答によって置き換えられます。これはバグですか?モーダルはブートストラップによってトリガーされます。
@Ajax.ActionLink("Add a comment", "AddComment", "Document", new { area = "", itemId = Model.ItemId }, new AjaxOptions { }, new { @class = "btn btn-warning", data_toggle = "modal", data_target = "#ItemCommentModal" })
<div id="ItemCommentModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="lblItemCommentModal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<div id ="ItemCommentModalBody">
</div>
</div>
</div>
</div>