我认为这是:
@using (Html.BeginRouteForm("Forums_default", new { action = "RewardPost", item = Model.PostId }, FormMethod.Post, new { @class = "reward" }))
现在,这些是我的路线:
context.MapRoute(
"Forums_thread",
"Forums/{action}/{category}/{item}",
new { controller = "Forums" }
);
context.MapRoute(
"Forums_category",
"Forums/{category}",
new { controller = "Forums", action = "ThreadList" }
);
context.MapRoute(
"Forums",
"Forums/",
new { controller = "Forums", action = "CategoryList" }
);
context.MapRoute(
"Forums_default",
"Forums/{action}/{item}",
new { controller = "Forums", action = "CategoryList", item = UrlParameter.Optional }
);
这是正在生成的表格:
<form action="/Forums/RewardPost/11" class="reward" method="post" novalidate="novalidate">...
</form>
这就是它重定向我的地方:/Forums/AddPost/4
现在的问题是:这里发生了什么?我该如何解决?