我有这个链接
@Ajax.RouteLink("Bid", RouteNames.Ajax.BidOnLot,
new
{
lotId = Model.Lot.Id,
bidAmount = Model.NextBidAmountForUser
},
new AjaxOptions
{
HttpMethod = "POST",
OnFailure = "OnFailure",
OnSuccess = "OnSuccess"
})
和这个动作方法
[AjaxOnly, HttpPost]
[Route("ajax/bid-on-lot/{lotId}/{bidAmount}", Name = RouteNames.Ajax.BidOnLot)]
[Authorize]
public JsonResult Bid(string lotId, decimal bidAmount)
RouteNames.Ajax.BidOnLot
被设定为"BidOnLot"
但是由于某种原因,当我单击该链接时,我收到一条带有此消息的 404。
404 Not Found - http://localhost:12472/ajax/bid-on-lot/lot-901/210.0
当我只有 LotId 参数时,一切正常,但添加一个额外的参数会使它全部失败。
为什么会这样?