我有这个表格
@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" />
}
在标题_BidEmail
为Bids
.
提交此表单时,它会调用控制器Bids/SendEmail
以及控制器Bids/_BidEmail
。为什么是这样?
如果我使用$("#EmailForm").submit(function(){return false;});
它不会调用SendEmail
但仍会调用_BidEmail
.