传统式

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

 

相关文章:

  • 2021-06-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2022-01-06
猜你喜欢
  • 2021-11-18
  • 2022-01-05
  • 2022-01-01
  • 2022-12-23
  • 2022-01-27
  • 2022-02-27
  • 2022-03-10
相关资源
相似解决方案