【发布时间】:2014-08-17 19:01:16
【问题描述】:
<div class="thumbnail" style="height: 70px; background-color: #EEEDED">
<div style="font-weight: bold;font-size: 20px;text-align: center">
@Html.Label(exam.ExamName,new{@style="cursor: pointer;color: #FF8627 "})
</div>
<div style="font-size: 15px;text-align: center;color: #505050">
@Html.Label("Total Tests: " + exam.TestInfoes.Count(), new{@style="cursor: pointer"})
</div>
</div>
我有上面的 HTML 块,我想把整个块放在我的 mvc4 应用程序中。 我们可以在标签之间使用maually编写整个块来做到这一点,但我也想在链接中传递一些值,这些值将为标签创建
<a href="~/Exam/SingleExam/" + some value from my model>
我们怎么做?
另外,我们如何使用 ActionLink 实现这一点?
【问题讨论】:
标签: c# html asp.net-mvc-4 html.actionlink