MVC之超链接的寻址

传统式

href直接跟链接地址URL

<a href="@Model.Base.BdtUrl" target="_blank">首页</a>><span>发布问题</span>

URL路由式@Url.RouteUrl

使用路由名称为指定的路由值生成完全限定URL

<a href="@Url.RouteUrl("Detail", new { id = topicModel.LT_ID })" target="_blank">@topicModel.LT_Title</a></li>

MVC路由超链接标签@Html.Routelink

@Html.RouteLink("精选酒店", "ProductListPage", new { cityID = Model.CurrentCityID, productType = ProductType.Hotel }, new { @class = (Model.ProductTypeSelected == ProductType.Hotel ? "current" : "") })        

MVC Action超链接标签  @Html.ActionLink

原文地址:https://www.cnblogs.com/sunxi/p/4549298.html