Skip to content

Instantly share code, notes, and snippets.

@azcoov
Created January 23, 2011 02:19
Show Gist options
  • Save azcoov/791743 to your computer and use it in GitHub Desktop.
Save azcoov/791743 to your computer and use it in GitHub Desktop.
Tag Cloud Partial View
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<div id="recent-tags">
<% foreach (var t in (IEnumerable<Models.BlogCategory>)ViewData["TagCloud"])
{%>
<a href="http://mysite/Blog/Listing/<%= Html.Encode(t.Category) %>" class="<%= BlogHelper.GetTagClass(t.BlogCategory_ID) %>" ><%= t.Category %></a>
<% }%>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment