1
<% foreach (var item in Model) { %>
<table width="100%" class="topicContainer">
<tr>
<td> <%: Html.DisplayFor(modelItem => item.headerclob) %></td>
</tr>
<tr>
<td><%: Html.ActionLink("ViewTopic", "ViewTopic","Forum" ,
new { id=item.topicId },null) %></td>
</tr>
</table>
<% } %>
我想链接ViewTopic item.headerclob
应该显示在超链接而不使用Razor。html.actionlink以C#变量作为参数
我也想应用它的CSS。
是的,这是一个轻微的错误,我刚刚看到它。必须错误地输入双引号。请将此标记为答案,如果这有助于谢谢 – Jayanga
如何将CSS应用于Html.ActionLink – coder25
编辑答案审查它 – Jayanga