0

我有这个表格

@using (Html.BeginForm("SendEmail", "Bids", FormMethod.Post, new { @id = "EmailForm" }))
{
    @Html.EditorFor(o => o.AddedVendors)
    @Html.HiddenFor(o => o.BidID)
    @Html.LabelFor(o => o.Negotiation)
    <br />
    @Html.EditorFor(o => o.Negotiation)
    <br />
    @Html.LabelFor(o => o.Subject)
    <br />
    @Html.EditorFor(o => o.Subject)
    <br />
    @Html.LabelFor(o => o.Body)
    <br />
    @Html.EditorFor(o => o.Body, "TextArea")
    <br />
    @Html.LabelFor(o => o.From)
    <br />
    @Html.EditorFor(o => o.From)
    <br />
    <input type="submit" value="Send" />
}

在标题_BidEmailBids.

提交此表单时,它会调用控制器Bids/SendEmail以及控制器Bids/_BidEmail。为什么是这样?

如果我使用$("#EmailForm").submit(function(){return false;});它不会调用SendEmail但仍会调用_BidEmail.

4

0 回答 0