有沒有辦法得到這個工作:ActionLink的使用T4MVC與塊的HTML代碼
@foreach (var item in Model.CategoryListByKeywordsDetails)
{
<li>
@Html.ActionLink("ver >", MVC.Ad.ListByCategory(item.Id, (string)ViewBag.keywords))
{
<em>@Html.DisplayFor(modelItem => item.SearchCount)</em> @Html.DisplayFor(modelItem => item.Name) <span class="float-right">ver ></span>
}
</li>
}
我想要的結果(我把空間來顯示HTML代碼):
<a href="/Ad/ListByCategory?categoryId=1&keywords=alfa">
<em>6</em>Carros
<span class="float-right">ver ></span>
</a>
謝謝,它的工作的偉大;)感謝您的幫助 – Patrick
快樂幫:) –