且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

MVC5路由问题

更新时间:2022-03-21 23:12:59

答案结果非常简单。

The answer turned out to be very simple.
@foreach (var item in Model.PostFeatureList)
{
     @Html.ActionLink((string)@item.Title, "Index", "Article");
     @Html.Raw(@item.Teaser)
}



路由器在ActionLink的Controller参数上添加Controller,因此删除它工作的Controller部分。



学习......宝贝步骤。


The router appends "Controller" on the Controller parameter in ActionLink so by removing the "Controller" portion it worked.

Learning...baby steps.