public Alert(IHtmlHelper helper, string title, Enums.AlertStyle style = Enums.AlertStyle.Success) { _writer = helper.ViewContext.Writer; var alertDiv = new TagBuilder("div"); alertDiv.AddCssClass("alert"); alertDiv.AddCssClass("alert-" + style.ToString().ToLower()); alertDiv.Attributes.Add("role", "alert"); alertDiv.TagRenderMode = TagRenderMode.StartTag; var strong = new TagBuilder("strong"); strong.InnerHtml.Append(title); string html = ToString(alertDiv) + ToString(strong); _writer.Write(html); }
public static Alert Alert(this IHtmlHelper html, string title, Enums.AlertStyle style = Enums.AlertStyle.Success) { return(new Alert(html, title, style)); }
public IAlertFluent Warning() { _style = Enums.AlertStyle.Warning; return new AlertFluent(this); }
public IAlertFluent Success() { _style = Enums.AlertStyle.Success; return new AlertFluent(this); }
public IAlertFluent Info() { _style = Enums.AlertStyle.Info; return new AlertFluent(this); }
public IAlertFluent Danger() { _style = Enums.AlertStyle.Danger; return new AlertFluent(this); }