Наследование: IBootstrapComponent
        /// <summary>
        /// Renders a Twitter Bootstrap badge component
        /// </summary>
        /// <param name="helper">The html helper.</param>
        /// <param name="text">The text.</param>
        /// <param name="status">The status.</param>
        /// <param name="htmlAttributes">The HTML attributes.</param>
        /// <returns>Returns a badge html string</returns>
        public static MvcHtmlString Badge(this HtmlHelper helper, string text, BootstrapStatus status, object htmlAttributes)
        {
            BadgeHelper badgeHelper = new BadgeHelper(helper, GetStatusStrategy(status), text, status, htmlAttributes);

            return(new MvcHtmlString(badgeHelper.Render()));
        }
Пример #2
0
 /// <summary>
 /// Renders a Twitter Bootstrap badge component
 /// </summary>
 /// <param name="helper">The html helper.</param>
 /// <param name="text">The text.</param>
 /// <param name="status">The status.</param>
 /// <param name="htmlAttributes">The HTML attributes.</param>
 /// <returns>Returns a badge html string</returns>
 public static MvcHtmlString Badge(this HtmlHelper helper, string text, BootstrapStatus status, object htmlAttributes)
 {
     BadgeHelper badgeHelper = new BadgeHelper(helper, GetStatusStrategy(status), text, status, htmlAttributes);
     return new MvcHtmlString(badgeHelper.Render());
 }