Skip to content

Instantly share code, notes, and snippets.

@DaveHogan
Created September 13, 2013 22:03
Show Gist options
  • Select an option

  • Save DaveHogan/6556693 to your computer and use it in GitHub Desktop.

Select an option

Save DaveHogan/6556693 to your computer and use it in GitHub Desktop.
MVC Html helper class that will render an table row
public static class HtmlHelperExtensions
{
public static MvcHtmlString EmptyRow(this HtmlHelper helper, string emptyTextMessage, int rowCount)
{
return new MvcHtmlString(string.Format("<tr class=\"emptyRow\"><td colspan=\"{0}\">{1}</td></tr>", rowCount, emptyTextMessage));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment