I have a list like below, which is fine:
<ul class="vlistmenu">
@foreach (var m in Model)
{
<li class="forum">@Html.ActionLink(m.LinkName, "Details", "Forum", new { id = m.Id }, null)</li>
}
</ul>
Now I'm trying to format the resulting MvcHtmlString from the call to Html.ActionLink and add some more information. But the sample below is not working as I was hoping for.
<ul class="vlistmenu">
@foreach (var m in Model)
{
var link = m.LinkName + "<br /><a style=\"font-size:smaller\">By: Ronron (July 11, 2011)</a>");
<li class="forum">@Html.ActionLink(link, "Details", "Forum", new { id = m.Id }, null)</li>
}
</ul>
Basically what I'd like is to append the literal string "By: Ronron (Jull 11, 2011)" to the info from my model, which is m.LinkName. However, I'd like that m.LinkName's font be bigger than the appended literal string. In addition, the literal string should start on the next line not immediately next to m.LinkName. The combined m.LinkName and appended string will form one action link.
?) not immediately next to m.LinkName. – Ronald Aug 20 '11 at 03:45
` element because it doesn't seem to have the correct semantic meaning here. – Nick Larsen Aug 20 '11 at 11:28