HtmlHelperExtensions.StarToggle Method

Namespace:
Weavy.Web.Extensions
Assembly:
Weavy.Web.dll

StarToggle(HtmlHelper, IStarrable, bool, object)

Returns an button element for starring/unstarring the specified entity.

public static MvcHtmlString StarToggle(this HtmlHelper html, IStarrable starrable, bool compact = true, object htmlAttributes = null)

Parameters

html
System.Web.Mvc.HtmlHelper

The HTML helper instance that this method extends.

starrable
IStarrable

The entity for which to generate a star link.

compact
bool

Set to false to allow toggling an unstarred entity.

htmlAttributes
object

Html attributes to merge with the button.

Returns

System.Web.Mvc.MvcHtmlString

An anchor element (a element).