0
我有這個鏈接Ajax.RouteLink給出了404
@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參數一切正常,但增加一個額外的參數使它都失敗。
這是怎麼發生的?