Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active January 6, 2016 17:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/b2e3263a31a2298ce379 to your computer and use it in GitHub Desktop.
Save bjoerntx/b2e3263a31a2298ce379 to your computer and use it in GitHub Desktop.
<ul>
@foreach (var item in Model) {
<li>
<a onclick="LoadFromController('@item.Name')" class="right" href="#">
<img src="~/img/doc.png" /><strong>@item.Name</strong>
<p>...
@{
if (Path.GetDirectoryName(item.FilePath).Length > 50)
{
@Path.GetDirectoryName(item.FilePath).Substring(
Path.GetDirectoryName(item.FilePath).Length - 50);
}
else
{
@Path.GetDirectoryName(item.FilePath);
}
}
</p>
</a>
</li>
}
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment